code: def set_function_name(f, name, cls):
      
      f.__name__ = name
      f.__qualname__ = '{klass}.{name}'.format(
          klass=cls.__name__,
          name=name)
      f.__module__ = cls.__module__
      return f
docs: Bind the name/qualname attributes of the function