code: def add_test(unit_test_class, test_name, test_fn):
      if has_test(unit_test_class, test_name):
          raise RuntimeError(
              "Found two tests with the same name: " + test_name
          )
      setattr(unit_test_class, test_name, test_fn)
  
imports: from collections import namedtuple
  import unittest
  import os
  import warnings
  import shutil
  import torch
  import torch.utils.cpp_extension
  import torch.testing._internal.common_nn
  from torch.testing._internal.common_cuda import TEST_CUDA
label_desc: Use image node_id 8 for calling a global function with example usage: add_test(unit_test_class, test_name, test_fn) without return types