code: def tensor2uint(img):
      img = img.data.squeeze().float().clamp_(0, 1).cpu().numpy()
      if img.ndim == 3:
          img = np.transpose(img, (1, 2, 0))
      return np.uint8((img * 255.0).round())
  
imports: import os
  import math
  import random
  import numpy
  import torch
  import cv2
  from torchvision.utils import make_grid
  from datetime import datetime
label_desc: Use image node_id 23 for calling a global function with example usage: tensor2uint(img) and returns: np