code: def test_hook_registry_and_builder(self):
      config = {"name": "test_hook", "a": 1, "b": 2}
      hook1 = build_hook(hook_config=config)
      self.assertTrue(isinstance(hook1, TestHook))
      self.assertTrue(hook1.state.a == 1)
      self.assertTrue(hook1.state.b == 2)
  
      hook_configs = [copy.deepcopy(config), copy.deepcopy(config)]
      hooks = build_hooks(hook_configs=hook_configs)
      for hook in hooks:
          self.assertTrue(isinstance(hook, TestHook))
          self.assertTrue(hook.state.a == 1)
          self.assertTrue(hook.state.b == 2)
  
file_path: ClassyVision/test/hooks_classy_hook_test.py
imports: import copy
  import unittest
  from classy_vision.hooks import build_hook, build_hooks, ClassyHook, register_hook
label_desc: Use image node_id 1 for calling the TestClassyHook obj's underlying member method code with example usage: obj.test_hook_registry_and_builder() without return types