code: def type(self):
          
          # pylint: disable=no-member
          if self.args.args and self.args.args[0].name == "self":
              if isinstance(self.parent.scope(), ClassDef):
                  return "method"
          return "function"
docs: Whether this is a method or function.
  
          :returns: 'method' if this is a method, 'function' otherwise.
          :rtype: str