def _load_function(pickled_func, globals):
 (code_info, func_info, doc) = pickle.loads(pickled_func)
 func = function(code(*code_info), globals, *func_info)
 func.func_doc = doc
 return func

def _load_function ( pickled_func , globals ) : ( code_info , func_info , doc ) = pickle . loads ( pickled_func ) func = function ( code ( * code_info ) , globals , * func_info ) func . func_doc = doc return func
recreates a serialized function .