docstr: Test that the hooks are constructed correctly.
docstr_tok: ["Test","that","the","hooks","are","constructed","correctly","."]
code: def test_constructors(self) -> None:
      """
      Test that the hooks are constructed correctly.
      """
      config = {
          "decay": 0.5,
          "consider_bn_buffers": True,
          "device": "cpu",
      }
      invalid_config1 = copy.deepcopy(config)
      del invalid_config1["decay"]
      invalid_config2 = copy.deepcopy(config)
      invalid_config2["device"] = "crazy_hardware"
  
      self.constructor_test_helper(
          config=config,
          hook_type=ExponentialMovingAverageModelHook,
          hook_registry_name="ema_model_weights",
          invalid_configs=[invalid_config1, invalid_config2],
      )
  
imports: import copy
  import math
  import unittest
  import unittest.mock
  import torch
  import torch.nn
  from classy_vision.hooks import ExponentialMovingAverageModelHook
  from classy_vision.models import ClassyModel
  from test.generic.hook_test_utils import HookTestBase
label_desc: Use image node_id 3 for calling the TestExponentialMovingAverageModelHook obj's underlying member method code with example usage: obj.test_constructors() without return types