parameters: (date, instructions, **deprecated_kwargs)
return_statement: return deprecated_wrapper
docstring: Decorator for marking specific function argument values as deprecated.
  
    This decorator logs a deprecation warning whenever the decorated function is
    called with the deprecated argument values. It has the following format:
  
      Calling <function> (from <module>) with <arg>=<value> is deprecated and
      will be removed after <date>. Instructions for updating:
        <instructions>
  
    <function> will include the class name if it is a method.
  
    It also edits the docstring of the function: ' (deprecated arguments)' is
    appended to the first line of the docstring and a deprecation notice is
    prepended to the rest of the docstring.
  
    Args:
      date: String. The date the function is scheduled to be removed. Must be
        ISO 8601 (YYYY-MM-DD).
      instructions: String. Instructions on how to update code using the
        deprecated function.
      **deprecated_kwargs: The deprecated argument values.
  
    Returns:
      Decorated function or method.
  
    Raises:
      ValueError: If date is not in ISO 8601 format, or instructions are empty.
docstring_summary: Decorator for marking specific function argument values as deprecated.
docstring_tokens: Decorator for marking specific function argument values as deprecated .
function: def deprecated_arg_values(date, instructions, **deprecated_kwargs):
    """Decorator for marking specific function argument values as deprecated.
  
    This decorator logs a deprecation warning whenever the decorated function is
    called with the deprecated argument values. It has the following format:
  
      Calling <function> (from <module>) with <arg>=<value> is deprecated and
      will be removed after <date>. Instructions for updating:
        <instructions>
  
    <function> will include the class name if it is a method.
  
    It also edits the docstring of the function: ' (deprecated arguments)' is
    appended to the first line of the docstring and a deprecation notice is
    prepended to the rest of the docstring.
  
    Args:
      date: String. The date the function is scheduled to be removed. Must be
        ISO 8601 (YYYY-MM-DD).
      instructions: String. Instructions on how to update code using the
        deprecated function.
      **deprecated_kwargs: The deprecated argument values.
  
    Returns:
      Decorated function or method.
  
    Raises:
      ValueError: If date is not in ISO 8601 format, or instructions are empty.
    """
    _validate_deprecation_args(date, instructions)
    if not deprecated_kwargs:
      raise ValueError('Specify which argument values are deprecated.')
  
    def deprecated_wrapper(func):
      """Deprecation decorator."""
      _validate_callable(func, 'deprecated_arg_values')
      @functools.wraps(func)
      def new_func(*args, **kwargs):
        """Deprecation wrapper."""
        named_args = inspect.getcallargs(func, *args, **kwargs)
        for arg_name, arg_value in deprecated_kwargs.items():
          if arg_name in named_args and named_args[arg_name] == arg_value:
            logging.warning(
                'Calling %s (from %s) with %s=%s is deprecated and will be '
                'removed after %s.\nInstructions for updating:\n%s',
                _get_qualified_name(func), func.__module__,
                arg_name, arg_value, date, instructions)
        return func(*args, **kwargs)
      new_func.__doc__ = _add_deprecated_arg_notice_to_docstring(
          func.__doc__, date, instructions)
      return new_func
    return deprecated_wrapper
function_tokens: def deprecated_arg_values ( date , instructions , * * deprecated_kwargs ) : _validate_deprecation_args ( date , instructions ) if not deprecated_kwargs : raise ValueError ( 'Specify which argument values are deprecated.' ) def deprecated_wrapper ( func ) : """Deprecation decorator.""" _validate_callable ( func , 'deprecated_arg_values' ) @ functools . wraps ( func ) def new_func ( * args , * * kwargs ) : """Deprecation wrapper.""" named_args = inspect . getcallargs ( func , * args , * * kwargs ) for arg_name , arg_value in deprecated_kwargs . items ( ) : if arg_name in named_args and named_args [ arg_name ] == arg_value : logging . warning ( 'Calling %s (from %s) with %s=%s is deprecated and will be ' 'removed after %s.\nInstructions for updating:\n%s' , _get_qualified_name ( func ) , func . __module__ , arg_name , arg_value , date , instructions ) return func ( * args , * * kwargs ) new_func . __doc__ = _add_deprecated_arg_notice_to_docstring ( func . __doc__ , date , instructions ) return new_func return deprecated_wrapper