def _HasSelf(self, sig):
    'True if a signature has a self parameter.\n\n    This only checks for the name, since the type can be too many different\n    things (type of the method, type of the parent class, object, unknown etc.)\n    and doesn\'t carry over to the simplified version, anyway.\n\n    Arguments:\n      sig: Function signature (instance of pytd.Signature)\n    Returns:\n      True if the signature has "self".\n    '
    return (sig.params and (sig.params[0].name == 'self'))
True if a signature has a self parameter.

This only checks for the name, since the type can be too many different
things (type of the method, type of the parent class, object, unknown etc.)
and doesn't carry over to the simplified version, anyway.

Arguments:
  sig: Function signature (instance of pytd.Signature)
Returns:
  True if the signature has "self".
def _HasSelf(self, sig):
    'True if a signature has a self parameter.\n\n    This only checks for the name, since the type can be too many different\n    things (type of the method, type of the parent class, object, unknown etc.)\n    and doesn\'t carry over to the simplified version, anyway.\n\n    Arguments:\n      sig: Function signature (instance of pytd.Signature)\n    Returns:\n      True if the signature has "self".\n    '
    return (sig.params and (sig.params[0].name == 'self'))