code: def xyxy2xywh(x):
      # Convert nx4 boxes from [x1, y1, x2, y2] to [x, y, w, h] where xy1=top-left, xy2=bottom-right
      y = (
          torch.zeros_like(x)
          if isinstance(x, torch.Tensor)
          else np.zeros_like(x)
      )
      y[:, 0] = (x[:, 0] + x[:, 2]) / 2  # x center
      y[:, 1] = (x[:, 1] + x[:, 3]) / 2  # y center
      y[:, 2] = x[:, 2] - x[:, 0]  # width
      y[:, 3] = x[:, 3] - x[:, 1]  # height
      return y
  
imports: import glob
  import math
  import os
  import random
  import time
  import cv2
  import matplotlib
  import numpy
  import torch
  import torch.nn
  import torchvision
  from tqdm import tqdm
  from build_utils import torch_utils
label_desc: Use image node_id 3 for calling a global function with example usage: xyxy2xywh(x) and returns: y