code: def _fullqualname_method_py3(obj):
      
  
      if inspect.isclass(obj.__self__):
          cls = obj.__self__.__qualname__
      else:
          cls = obj.__self__.__class__.__qualname__
  
      return obj.__self__.__module__ + '.' + cls + '.' + obj.__name__
docs: Fully qualified name for 'method' objects in Python 3.