class_docstr: Attribution is computed either normally or with the changes based on the
  mode, which cause an error. Once attribution is calculated, test verifies
  that no forward, backward or forward pre hooks remain on any modules.
code: def __new__(cls, name: str, bases: Tuple, attrs: Dict):
      created_tests: Dict[
          Tuple[Type[Attribution], HookRemovalMode], bool
      ] = {}
      for test_config in config:
          (
              algorithms,
              model,
              args,
              layer,
              noise_tunnel,
              _,
          ) = parse_test_config(test_config)
  
          for algorithm in algorithms:
              if not should_create_generated_test(algorithm):
                  continue
              for mode in HookRemovalMode:
                  if (
                      mode is HookRemovalMode.invalid_module
                      and layer is None
                  ):
                      continue
                  # Only one test per algorithm and mode is necessary
                  if (algorithm, mode) in created_tests:
                      continue
  
                  test_method = cls.make_single_hook_removal_test(
                      algorithm,
                      model,
                      layer,
                      args,
                      noise_tunnel,
                      mode,
                  )
                  test_name = gen_test_name(
                      "test_hook_removal_" + mode.name,
                      cast(str, test_config["name"]),
                      algorithm,
                      noise_tunnel,
                  )
  
                  if test_name in attrs:
                      raise AssertionError(
                          "Trying to overwrite existing test with name: %r"
                          % test_name
                      )
                  attrs[test_name] = test_method
                  created_tests[(algorithm, mode)] = True
      return super(HookRemovalMeta, cls).__new__(
          cls, name, bases, attrs
      )
  
imports: from enum import Enum
  from typing import Any, Callable, cast, Dict, Optional, Tuple, Type
  import torch
  from captum.attr._core.noise_tunnel import NoiseTunnel
  from captum.attr._models.base import _set_deep_layer_value
  from captum.attr._utils.attribution import Attribution, InternalAttribution
  from tests.attr.helpers.gen_test_utils import gen_test_name, get_target_layer, parse_test_config, should_create_generated_test
  from tests.attr.helpers.test_config import config
  from tests.helpers.basic import BaseTest, deep_copy_args
  from torch.nn import Module
label_desc: Use image node_id 1 for calling the HookRemovalMeta obj's underlying member method code with example usage: obj.__new__(cls, name, bases, attrs) and returns: super