docs: def get_true_function(obj):
      "Returns the actual function and a boolean indicated if this is a method or not."
      if not callable(obj):
          raise TypeError("%r is not callable." % (obj,))
      ismethod = inspect.ismethod(obj)
      if inspect.isfunction(obj) or ismethod:
          return obj, ismethod
      if hasattr(obj, 'im_func'):
          return obj.im_func, True
      if inspect.isclass(obj):
          return getattr(obj, '__init__', None), True
      if isinstance(obj, object):
          if hasattr(obj, 'func'):
              return get_true_function(obj.func)
          return obj.__call__, True
      raise TypeError("Unknown type of object: %r" % obj)