code: def imwrite(img, img_path):
      img = np.squeeze(img)
      if img.ndim == 3:
          img = img[:, :, [2, 1, 0]]
      cv2.imwrite(img_path, img)
  
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 15 for calling a global function with example usage: imwrite(img, img_path) without return types