code: def warn_on_kwargs(
      callable_with_kwargs: Callable, **kwargs: Any
  ) -> None:
      """Log a warning when a decoder function receives unexpected kwargs.
  
      NOTE: This mainly caters to the use case where an older version of Ax is
      used to decode objects, serialized to JSON by a newer version of Ax (and
      therefore potentially containing new fields). In that case, the decoding
      function should not fail when encountering those additional fields, but
      rather just ignore them and log a warning using this function.
      """
      if kwargs:
          logger.warning(
              "Found unexpected kwargs: %s while calling %s "
              "from JSON. These kwargs will be ignored.",
              kwargs,
              callable_with_kwargs,
          )
  
file_path: Ax/ax/utils/common/kwargs.py
imports: from inspect import Parameter, signature
  from logging import Logger
  from typing import Any, Callable, Dict, Iterable, List, Optional
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import version_safe_check_type
label_desc: Use image node_id 5 for calling a global function with example usage: warn_on_kwargs(callable_with_kwargs) without return types