code: def _transfer_deprecated_param_vals(replacement_params, kwargs):
      """Reassigns new parameters \
      the values passed to their corresponding deprecated parameters \
      for the decorator replace_parameters().
  
      Parameters
      ----------
      replacement_params : Dict[str, str]
          Dictionary of old_parameters as keys with replacement parameters
          as their corresponding values.
  
      kwargs : Dict[str, any]
          Dictionary of all the keyword args passed on the decorated function.
  
      Returns
      -------
      kwargs : Dict[str, any]
          Dictionary of all the keyword args to be passed on
          to the decorated function, with old parameter names
          replaced by new parameters, with their values intact.
  
      """
      for old_param, new_param in replacement_params.items():
          old_param_val = kwargs.setdefault(old_param, None)
          if old_param_val is not None:
              kwargs[new_param] = old_param_val
          kwargs.pop(old_param)
      return kwargs
  
file_path: nilearn/nilearn/_utils/helpers.py
imports: import functools
  import operator
  import os
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: _transfer_deprecated_param_vals(replacement_params, kwargs) and returns: kwargs