code: def test_to_tensor_normalization(
      enable: bool, mean: Union[int, list], std: Union[int, list]
  ) -> None:
      """
      This function tests the ToTensor transform with and without mean/std normalization when the mean and std
      are either floats or lists.
      """
      C, H, W = 3, 2, 2
  
      parser = argparse.ArgumentParser()
      parser = pil_transforms.ToTensor.add_arguments(parser)
  
      opts = parser.parse_args([])
      setattr(
          opts,
          "image_augmentation.to_tensor.mean_std_normalization.enable",
          enable,
      )
      setattr(
          opts,
          "image_augmentation.to_tensor.mean_std_normalization.mean",
          mean,
      )
      setattr(
          opts,
          "image_augmentation.to_tensor.mean_std_normalization.std",
          std,
      )
      setattr(opts, "image_augmentation.to_tensor.dtype", "uint8")
  
      to_tensor = pil_transforms.ToTensor(opts=opts)
  
      x = torch.ones(1, C, H, W)
      x = x.float()
      data = {
          "image": x,
      }
  
      y = to_tensor(data)["image"]
      z = torch.zeros(1, C, H, W) if enable else x
  
      assert torch.equal(z, y)
  
file_path: ml-cvnets/tests/transforms/test_image.py
imports: import argparse
  import random
  from typing import Tuple, Union
  import pytest
  import torch
  from PIL import Image
  from data.transforms import image_pil
  from data.transforms import image_torch
label_desc: Use image node_id 4 for calling a global function with example usage: test_to_tensor_normalization(enable, mean, std) without return types