def _HasShorterVersion(self, sig, optional_arg_sigs):
    "Find a shorter signature with optional arguments for a longer signature.\n\n    Arguments:\n      sig: The function signature we'd like to shorten\n      optional_arg_sigs: A set of function signatures with optional arguments\n        that will be matched against sig.\n\n    Returns:\n      True if there is a shorter signature that generalizes sig, but is not\n          identical to sig.\n    "
    param_count = len(sig.params)
    if (not sig.has_optional):
        param_count += 1
    for i in six.moves.xrange(param_count):
        if (sig.params[0:i] in optional_arg_sigs):
            return True
    return False
Find a shorter signature with optional arguments for a longer signature.

Arguments:
  sig: The function signature we'd like to shorten
  optional_arg_sigs: A set of function signatures with optional arguments
    that will be matched against sig.

Returns:
  True if there is a shorter signature that generalizes sig, but is not
      identical to sig.
def _HasShorterVersion(self, sig, optional_arg_sigs):
    "Find a shorter signature with optional arguments for a longer signature.\n\n    Arguments:\n      sig: The function signature we'd like to shorten\n      optional_arg_sigs: A set of function signatures with optional arguments\n        that will be matched against sig.\n\n    Returns:\n      True if there is a shorter signature that generalizes sig, but is not\n          identical to sig.\n    "
    param_count = len(sig.params)
    if (not sig.has_optional):
        param_count += 1
    for i in six.moves.xrange(param_count):
        if (sig.params[0:i] in optional_arg_sigs):
            return True
    return False