docstr: Test deprecated arg (with a default value) being replaced.
docstr_tok: ["Test","deprecated","arg","(","with","a","default","value",")","being","replaced","."]
code: def test_replacement_arg2(self):
      """
      Test deprecated arg (with a default value) being replaced.
      """
  
      @deprecated_arg(
          "b",
          new_name="a",
          since=self.prev_version,
          version_val=self.test_version,
      )
      def afoo4(a, b=None, **kwargs):
          return a, kwargs
  
      self.assertEqual(afoo4(b=2, c=3), (2, {"c": 3}))
      self.assertEqual(
          afoo4(1, b=2, c=3), (1, {"c": 3})
      )  # new name is in use
      self.assertEqual(
          afoo4(a=1, b=2, c=3), (1, {"c": 3})
      )  # prefers the new arg
      self.assertEqual(afoo4(1, 2, c=3), (1, {"c": 3}))
  
imports: from __future__ import annotations
  import unittest
  import warnings
  from monai.utils import DeprecatedError, deprecated, deprecated_arg, deprecated_arg_default
label_desc: Use image node_id 22 for calling the TestDeprecated obj's underlying member method code with example usage: obj.test_replacement_arg2() and returns: a,  kwargs