code: def deprecated_kwargs(
      *arguments: List[str],
      message: str = (
          "The keyword argument '{argument}' of '{func_name}' is deprecated."
      ),
      error: bool = True,
  ) -> Callable:
      """Used as a decorator when deprecating function's keyword arguments.
  
      Examples:
  
          ```python
          from janitor.utils import deprecated_kwargs
  
          @deprecated_kwargs('x', 'y')
          def plus(a, b, x=0, y=0):
              return a + b
          ```
  
      Args:
          *arguments: The list of deprecated keyword arguments.
          message: The message of `ValueError` or `DeprecationWarning`.
              It should be a string or a string template. If a string template
              defaults input `func_name` and `argument`.
          error: If True, raises `ValueError` else returns `DeprecationWarning`.
  
      Raises:
          ValueError: If one of `arguments` is in the decorated function's
              keyword arguments.
  
      Returns:
          The original function wrapped with the deprecated `kwargs`
              checking function.
  
      <!--
      # noqa: DAR402
      -->
      """
  
      def decorator(func):
          @wraps(func)
          def wrapper(*args, **kwargs):
              for argument in arguments:
                  if argument in kwargs:
                      msg = message.format(
                          func_name=func.__name__,
                          argument=argument,
                      )
                      if error:
                          raise ValueError(msg)
                      else:
                          warn(msg, DeprecationWarning)
  
              return func(*args, **kwargs)
  
          return wrapper
  
      return decorator
  
imports: from __future__ import annotations
  import importlib
  import os
  import socket
  import sys
  from functools import singledispatch, wraps
  from pathlib import Path
  from typing import Any, Callable, Dict, Iterable, List, Union
  from warnings import warn
  import numpy
  import pandas
label_desc: Use image node_id 10 for calling a global function with example usage: deprecated_kwargs() and returns: decorator, wrapper, func