Function
pickle.whichmodule

Signature

whichmodule(func, funcname)

Documentation String

Figure out the module in which a function occurs.

Search sys.modules for the module. Cache in classmap. Return a module name. If the function cannot be found, return "__main__".