code: def rename_parameters(
      replacement_params,
      end_version="future",
      lib_name="Nilearn",
  ):
      """Use this decorator to deprecate & replace specified parameters \
      in the decorated functions and methods without changing \
      function definition or signature.
  
      Parameters
      ----------
      replacement_params : Dict[string, string]
          Dict where the key-value pairs represent the old parameters
          and their corresponding new parameters.
          Example: {old_param1: new_param1, old_param2: new_param2,...}
  
      end_version : str {'future' | 'next' | <version>}, default='future'
          Version when using the deprecated parameters will raise an error.
          For informational purpose in the warning text.
  
      lib_name : str, default='Nilearn'
          Name of the library to which the decoratee belongs.
          For informational purpose in the warning text.
  
      """
  
      def _replace_params(func):
          @functools.wraps(func)
          def wrapper(*args, **kwargs):
              _warn_deprecated_params(
                  replacement_params, end_version, lib_name, kwargs
              )
              kwargs = _transfer_deprecated_param_vals(
                  replacement_params, kwargs
              )
              return func(*args, **kwargs)
  
          return wrapper
  
      return _replace_params
  
file_path: nilearn/nilearn/_utils/helpers.py
imports: import functools
  import operator
  import os
  import warnings
label_desc: Use image node_id 1 for calling a global function with example usage: rename_parameters(replacement_params, end_version, lib_name) and returns: _replace_params, wrapper, func