def METHOD_NAME(func, params, **kwargs):
  """Generates an argument list to call func.
  Args:
    func: A callable to be called.
    params: A Params object containing arguments for `func`.
    **kwargs: Argument/value pairs that should override params.
  Returns:
    A dict containing function parameters to be used as `**kwargs` of `func`.
  """
  out_kwargs = {}
  # Here we set bound=False so the `func` is expected to be already a bound
  # function.
  for p in _ExtractParameters(func, ignore=None, bound=False):
    key = p.name
    # We will collect only args defined in at least either `kwargs` or `params`.
    # Args in `func`'s signature but in neither both will be skipped.
    if key in kwargs:
      # Anything in kwargs overrides parameters.
      out_kwargs[key] = kwargs[key]
    elif key in params:
      value = params.Get(key)
      # If the value in params is the same as the function default, we do not
      # set the arg so that we will let the function signature fill in this
      # parameter by itself.
      if value != p.default:
        out_kwargs[key] = value
  return out_kwargs