code: def __call__(self, pil_img):
      np_img = np.array(pil_img, dtype=np.uint8)
      if np_img.ndim < 3:
          np_img = np.expand_dims(np_img, axis=-1)
      np_img = np.rollaxis(np_img, 2)  # HWC to CHW
      return torch.from_numpy(np_img).to(dtype=self.dtype)
  
imports: import math
  import numbers
  import random
  import warnings
  from typing import List, Sequence, Tuple, Union
  import torch
  import torchvision.transforms.functional
  from PIL import Image
  import numpy
label_desc: Use image node_id 2 for calling the ToTensor obj's underlying member method code with example usage: obj.__call__(pil_img) and returns: torch