def safe_load(s): try: o = dill.loads(s) return o except: return None # return functions that execute as expected on example inputs