code: def test_deprecated_argument_remove():
      @deprecated_params("x", None, "0.3", alternative="test2.y")
      def test(dummy=11, x=3):
          return dummy, x
  
      @deprecated_params("x", None, "0.3", "0.5", alternative="test2.y")
      def test2(dummy=11, x=3):
          return dummy, x
  
      @deprecated_params(
          ["dummy", "x"], None, "0.3", alternative="test2.y"
      )
      def test3(dummy=11, x=3):
          return dummy, x
  
      @deprecated_params(
          ["dummy", "x"], None, "0.3", "0.5", alternative="test2.y"
      )
      def test4(dummy=11, x=3):
          return dummy, x
  
      with pytest.warns(
          ArgsDeprecationWarning, match=r"Use test2\.y instead"
      ) as w:
          npt.assert_equal(test(x=1), (11, 1))
      npt.assert_equal(len(w), 1)
  
      with pytest.warns(
          ArgsDeprecationWarning, match=r"Use test2\.y instead"
      ) as w:
          npt.assert_equal(test(x=1, dummy=10), (10, 1))
      npt.assert_equal(len(w), 1)
  
      with pytest.warns(
          ArgsDeprecationWarning, match=r"Use test2\.y instead"
      ):
          npt.assert_equal(test(121, 1), (121, 1))
  
      with pytest.warns(
          ArgsDeprecationWarning, match=r"Use test2\.y instead"
      ) as w:
          npt.assert_equal(test3(121, 1), (121, 1))
  
      npt.assert_raises(ExpiredDeprecationError, test4, 121, 1)
      npt.assert_raises(ExpiredDeprecationError, test4, dummy=121, x=1)
      npt.assert_raises(ExpiredDeprecationError, test4, 121, x=1)
      npt.assert_raises(ExpiredDeprecationError, test2, x=1)
      npt.assert_equal(test(), (11, 3))
      npt.assert_equal(test(121), (121, 3))
      npt.assert_equal(test(dummy=121), (121, 3))
  
file_path: dipy/dipy/utils/tests/test_deprecator.py
imports: import sys
  import warnings
  import numpy.testing
  import pytest
  import dipy
  from dipy.testing import clear_and_catch_warnings, assert_true
  from dipy.utils.deprecator import cmp_pkg_version, _add_dep_doc, _ensure_cr, deprecate_with_version, deprecated_params, ArgsDeprecationWarning, ExpiredDeprecationError
label_desc: Use image node_id 9 for calling a global function with example usage: test_deprecated_argument_remove() and returns: dummy,  x, dummy,  x, dummy,  x, dummy,  x