@staticmethod<EOL><INDENT>def _to_original_callable(obj):<DEDENT>
while True:<EOL><INDENT>if inspect.isfunction(obj) or inspect.isclass(obj):<EOL><INDENT>f = inspect.getfile(obj)<EOL>if f.startswith('<STR_LIT:<>') and f.endswith('<STR_LIT:>>'):<EOL><INDENT>return None<EOL><DEDENT>return obj<EOL><DEDENT>if inspect.ismethod(obj):<EOL><INDENT>obj = obj.__func__<EOL><DEDENT>elif isinstance(obj, functools.partial):<EOL><INDENT>obj = obj.func<EOL><DEDENT>elif isinstance(obj, property):<EOL><INDENT>obj = obj.fget<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT><DEDENT>
Find the Python object that contains the source code of the object.

This is useful to find the place in the source code (file and line
number) where a docstring is defined. It does not currently work for
all cases, but it should help find some (properties...).