code: def _add_method_dunders(self, method):
          
          try:
              method.__module__ = self._cls.__module__
          except AttributeError:
              pass
  
          try:
              method.__qualname__ = ".".join(
                  (self._cls.__qualname__, method.__name__)
              )
          except AttributeError:
              pass
  
          return method
docs: Add __module__ and __qualname__ to a *method* if possible.