code: def test_future_warn_deprecated_params():
      """Unit test to check that the correct warning is displayed."""
      (
          mock_input,
          replacement_params,
      ) = _mock_args_for_testing_replace_parameter()
      expected_warnings = [
          (
              'The parameter "deprecated_param_0" will be removed in sometime '
              "release of somelib. "
              'Please use the parameter "replacement_param_0" instead.'
          ),
          (
              'The parameter "deprecated_param_1" will be removed in sometime '
              "release of somelib. "
              'Please use the parameter "replacement_param_1" instead.'
          ),
      ]
      with warnings.catch_warnings(record=True) as raised_warnings:
          helpers._warn_deprecated_params(
              replacement_params,
              end_version="sometime",
              lib_name="somelib",
              kwargs=mock_input,
          )
      expected_warnings.sort()
      raised_warnings.sort(key=lambda mem: str(mem.message))
      for raised_warning_, expected_warning_ in zip(
          raised_warnings, expected_warnings
      ):
          assert raised_warning_.category is DeprecationWarning
          assert str(raised_warning_.message) == expected_warning_
  
file_path: nilearn/nilearn/_utils/tests/test_helpers.py
imports: import warnings
  import pytest
  from nilearn._utils import helpers
label_desc: Use image node_id 4 for calling a global function with example usage: test_future_warn_deprecated_params() without return types