parameters: (model_fn, params)
docstring: Verifies model fn arguments.
docstring_summary: Verifies model fn arguments.
docstring_tokens: Verifies model fn arguments .
function: def _verify_model_fn_args(model_fn, params):
    """Verifies model fn arguments."""
    args = set(util.fn_args(model_fn))
    if 'features' not in args:
      raise ValueError('model_fn (%s) must include features argument.' % model_fn)
    if params is not None and 'params' not in args:
      raise ValueError('model_fn (%s) does not include params argument, '
                       'but params (%s) is passed to Estimator.' % (model_fn,
                                                                    params))
    if params is None and 'params' in args:
      logging.warning('Estimator\'s model_fn (%s) includes params '
                      'argument, but params are not passed to Estimator.',
                      model_fn)
    if tf_inspect.ismethod(model_fn):
      if 'self' in args:
        args.remove('self')
    non_valid_args = list(args - _VALID_MODEL_FN_ARGS)
    if non_valid_args:
      raise ValueError('model_fn (%s) has following not expected args: %s' %
                       (model_fn, non_valid_args))
function_tokens: def _verify_model_fn_args ( model_fn , params ) : args = set ( util . fn_args ( model_fn ) ) if 'features' not in args : raise ValueError ( 'model_fn (%s) must include features argument.' % model_fn ) if params is not None and 'params' not in args : raise ValueError ( 'model_fn (%s) does not include params argument, ' 'but params (%s) is passed to Estimator.' % ( model_fn , params ) ) if params is None and 'params' in args : logging . warning ( 'Estimator\'s model_fn (%s) includes params ' 'argument, but params are not passed to Estimator.' , model_fn ) if tf_inspect . ismethod ( model_fn ) : if 'self' in args : args . remove ( 'self' ) non_valid_args = list ( args - _VALID_MODEL_FN_ARGS ) if non_valid_args : raise ValueError ( 'model_fn (%s) has following not expected args: %s' % ( model_fn , non_valid_args ) )