code: def test_resolve(self, configs, expected_id, output_type):
      locator = ComponentLocator()
      resolver = ReferenceResolver()
      # add items to resolver
      for k, v in configs.items():
          k = k.replace("#", "::")
          if ConfigComponent.is_instantiable(v):
              resolver.add_item(
                  ConfigComponent(config=v, id=k, locator=locator)
              )
          elif ConfigExpression.is_expression(v):
              resolver.add_item(
                  ConfigExpression(
                      config=v,
                      id=k,
                      globals={"monai": monai, "torch": torch},
                  )
              )
          else:
              resolver.add_item(ConfigItem(config=v, id=k))
  
      result = resolver.get_resolved_content(
          expected_id
      )  # the root id is `expected_id` here
      self.assertTrue(isinstance(result, output_type))
  
      # test lazy instantiation
      item = resolver.get_item(expected_id, resolve=True)
      config = item.get_config()
      config["_disabled_"] = False
      item.update_config(config=config)
      if isinstance(item, ConfigComponent):
          result = item.instantiate()
      else:
          result = item.get_config()
      self.assertTrue(isinstance(result, output_type))
  
file_path: MONAI/tests/test_reference_resolver.py
imports: from __future__ import annotations
  import unittest
  import torch
  from parameterized import parameterized
  import monai
  from monai.bundle.config_item import ComponentLocator, ConfigComponent, ConfigExpression, ConfigItem
  from monai.bundle.reference_resolver import ReferenceResolver
  from monai.data import DataLoader
  from monai.transforms import LoadImaged, RandTorchVisiond
  from monai.utils import min_version, optional_import
label_desc: Use image node_id 1 for calling the TestReferenceResolver obj's underlying member method code with example usage: obj.test_resolve(configs, expected_id, output_type) without return types