code: def test_transforms(self):
      input = self.get_test_image()
  
      # reference transform which we will use to validate the built transforms
      reference_transform = ImagenetNoAugmentTransform()
      reference_output = reference_transform(input)
  
      # test a registered transform
      config = [{"name": "imagenet_no_augment"}]
      transform = build_transforms(config)
      output = transform(input)
      self.assertTrue(torch.allclose(output, reference_output))
  
      # test a transform built using torchvision transforms
      config = [
          {"name": "Resize", "size": 256},
          {"name": "CenterCrop", "size": 224},
          {"name": "ToTensor"},
          {
              "name": "Normalize",
              "mean": [0.485, 0.456, 0.406],
              "std": [0.229, 0.224, 0.225],
          },
      ]
      transform = build_transforms(config)
      output = transform(input)
      self.assertTrue(torch.allclose(output, reference_output))
  
      # test a combination of registered and torchvision transforms
      config = [
          {"name": "resize", "size": 256},
          {"name": "center_crop", "size": 224},
          {"name": "ToTensor"},
          {
              "name": "Normalize",
              "mean": [0.485, 0.456, 0.406],
              "std": [0.229, 0.224, 0.225],
          },
      ]
      transform = build_transforms(config)
      output = transform(input)
      self.assertTrue(torch.allclose(output, reference_output))
  
file_path: ClassyVision/test/dataset_transforms_test.py
imports: import unittest
  import torch
  import torchvision.transforms
  from classy_vision.dataset.transforms import build_transforms, ClassyTransform, register_transform
  from classy_vision.dataset.transforms.util import ImagenetNoAugmentTransform
label_desc: Use image node_id 2 for calling the DatasetTransformsTest obj's underlying member method code with example usage: obj.test_transforms() without return types