code: def _to_original_callable(obj):
          
          while True:
              if inspect.isfunction(obj) or inspect.isclass(obj):
                  f = inspect.getfile(obj)
                  if f.startswith('<') and f.endswith('>'):
                      return None
                  return obj
              if inspect.ismethod(obj):
                  obj = obj.__func__
              elif isinstance(obj, functools.partial):
                  obj = obj.func
              elif isinstance(obj, property):
                  obj = obj.fget
              else:
                  return None
docs: 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...).