code: def __call__(self, img):
      assert isinstance(img, (np.ndarray, PIL.Image.Image))
      if isinstance(img, PIL.Image.Image):
          img = np.asarray(img)
      img = img[:, :, ::-1]  # 2 BGR
      img = np.transpose(img, [2, 0, 1])  # 2 (3, H, W)
      img = np.ascontiguousarray(img)
      img = torch.from_numpy(img).float()
      return img
  
file_path: nni/test/algo/nas/hub/test_pretrained.py
imports: import os
  import numpy
  import torch
  import tqdm
  import PIL
  from torch.utils.data import SubsetRandomSampler, DataLoader
  from torchvision import transforms
  from torchvision.datasets import ImageNet, CIFAR10
label_desc: Use image node_id 1 for calling the ToBGRTensor obj's underlying member method code with example usage: obj.__call__(img) and returns: img