code: def test_raises(self):
      # name doesn't exist in module
      with self.assertRaises(AttributeError):
          replace_modules(
              self.net,
              "non_existent_module",
              torch.nn.Softmax(),
              strict_match=True,
          )
      with self.assertRaises(AttributeError):
          with replace_modules_temp(
              self.net,
              "non_existent_module",
              torch.nn.Softmax(),
              strict_match=True,
          ):
              pass
  
file_path: MONAI/tests/test_replace_module.py
imports: from __future__ import annotations
  import unittest
  import torch
  from parameterized import parameterized
  from monai.networks.nets import DenseNet121
  from monai.networks.utils import replace_modules, replace_modules_temp
  from tests.utils import TEST_DEVICES
label_desc: Use image node_id 6 for calling the TestReplaceModule obj's underlying member method code with example usage: obj.test_raises() without return types