code: def _raise_deprecation_warning_if_kwargs(
      fn_name: str, kwargs: Dict[str, Any]
  ) -> None:
      """
      Raise a warning if kwargs are provided.
  
      Some functions used to support **kwargs. The applicable parameters have now been
      refactored to be named arguments, so no warning will be raised for users passing
      the expected arguments. However, if a user had been passing an inapplicable
      keyword argument, this will now raise a warning whereas in the past it did
      nothing.
      """
      if len(kwargs) > 0:
          warnings.warn(
              f"`{fn_name}` does not support arguments {list(kwargs.keys())}. In "
              "the future, this will become an error.",
              DeprecationWarning,
          )
  
imports: from __future__ import annotations
  import dataclasses
  import warnings
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  from botorch.acquisition.acquisition import AcquisitionFunction, OneShotAcquisitionFunction
  from botorch.acquisition.knowledge_gradient import qKnowledgeGradient
  from botorch.acquisition.multi_objective.hypervolume_knowledge_gradient import qHypervolumeKnowledgeGradient
  from botorch.exceptions import InputDataError, UnsupportedError
  from botorch.exceptions.warnings import OptimizationWarning
  from botorch.generation.gen import gen_candidates_scipy, TGenCandidates
  from botorch.logging import logger
  from botorch.optim.initializers import gen_batch_initial_conditions, gen_one_shot_hvkg_initial_conditions, gen_one_shot_kg_initial_conditions, TGenInitialConditions
  from botorch.optim.stopping import ExpMAStoppingCriterion
  from botorch.optim.utils import _filter_kwargs
  from torch import Tensor
label_desc: Use image node_id 1 for calling a global function with example usage: _raise_deprecation_warning_if_kwargs(fn_name, kwargs) without return types