
    BVh                     "    d Z ddlZddlmZ d Zy)zKeyword args functions.    N)decorator_utilsc                 n     t        j                   d       t        j                          fd       }|S )a  Decorator for marking specific function accepting keyword args only.

  This decorator raises a `ValueError` if the input `func` is called with any
  non-keyword args. This prevents the caller from providing the arguments in
  wrong order.

  Args:
    func: The function or method needed to be decorated.

  Returns:
    Decorated function or method.

  Raises:
    ValueError: If `func` is not callable.
  keyword_args_onlyc                  N    | rt        dj                   d|         di |S )zKeyword args only wrapper.zThe function zp only accepts keyword arguments. Do not pass positional arguments. Received the following positional arguments:  )
ValueError__name__)argskwargsfuncs     S/home/dcms/DCMS/lib/python3.12/site-packages/tensorflow/python/util/keyword_args.pynew_funcz#keyword_args_only.<locals>.new_func)   s=     $-- )v    >&>    )r   validate_callable	functoolswraps)r   r   s   ` r   r   r      s8    " ##D*=>??4  
/r   )__doc__r   tensorflow.python.utilr   r   r   r   r   <module>r      s       2r   