code: def img_to_tensor(im, normalize=None):
      tensor = torch.from_numpy(
          np.moveaxis(
              im / (255.0 if im.dtype == np.uint8 else 1), -1, 0
          ).astype(np.float32)
      )
      if normalize is not None:
          return F.normalize(tensor, **normalize)
      return tensor
  
imports: from __future__ import absolute_import
  import warnings
  import numpy
  import torch
  from torchvision.transforms import functional
  from ..core.transforms_interface import BasicTransform
label_desc: Use image node_id 1 for calling a global function with example usage: img_to_tensor(im, normalize) and returns: tensor, F