The dill package seems to be able to serialize most Python most objects, even lambda functions, which would be ideal for local caching of said functions used within semantic triples and the SOFT7 entities to represent the functions to be resolved in order to retrieve desired parameter values.