code: def uint2tensor3(img):
      if img.ndim == 2:
          img = np.expand_dims(img, axis=2)
      return (
          torch.from_numpy(np.ascontiguousarray(img))
          .permute(2, 0, 1)
          .float()
          .div(255.0)
      )
  
imports: import math
  import os
  import random
  from datetime import datetime
  import cv2
  import numpy
  import torch
  from torchvision.utils import make_grid
label_desc: Use image node_id 22 for calling a global function with example usage: uint2tensor3(img) and returns: torch