code: def _doc_method(klass, func):
      
      argspec = inspect.getfullargspec(func)
      # Remove first 'self' argument.
      if argspec.args and argspec.args[0] == 'self':
          del argspec.args[0]
      args = inspect.formatargspec(*argspec)
      header = "{klass}.{name}{args}".format(klass=klass.__name__,
                                               name=_name(func),
                                               args=args,
                                               )
      docstring = _doc(func)
      return _concat(header, docstring)
docs: Generate the docstring of a method.