(fn, arg_name)
return arg_name in arg_spec.args or arg_name in arg_spec.kwonlyargs
Returns True if `arg_name` might be a valid parameter for `fn`.

  Specifically, this means that `fn` either has a parameter named
  `arg_name`, or has a `**kwargs` parameter.

  Args:
    fn: The function to check.
    arg_name: The name fo the parameter.

  Returns:
    Whether `arg_name` might be a valid argument of `fn`.
Returns True if `arg_name` might be a valid parameter for `fn`.
Returns True if arg_name might be a valid parameter for fn .
def _has_arg(fn, arg_name):
  """Returns True if `arg_name` might be a valid parameter for `fn`.

  Specifically, this means that `fn` either has a parameter named
  `arg_name`, or has a `**kwargs` parameter.

  Args:
    fn: The function to check.
    arg_name: The name fo the parameter.

  Returns:
    Whether `arg_name` might be a valid argument of `fn`.
  """
  while isinstance(fn, functools.partial):
    fn = fn.func
  while hasattr(fn, "__wrapped__"):
    fn = fn.__wrapped__
  arg_spec = _getfullargspec(fn)
  if arg_spec.varkw:
    return True
  return arg_name in arg_spec.args or arg_name in arg_spec.kwonlyargs
def _has_arg ( fn , arg_name ) : while isinstance ( fn , functools . partial ) : fn = fn . func while hasattr ( fn , "__wrapped__" ) : fn = fn . __wrapped__ arg_spec = _getfullargspec ( fn ) if arg_spec . varkw : return True return arg_name in arg_spec . args or arg_name in arg_spec . kwonlyargs