code: def xywh2xyxy(bboxes):
      if len(bboxes.shape) == 1:
          new_bboxes = np.empty_like(bboxes)
          new_bboxes[0] = bboxes[0] - bboxes[2] / 2
          new_bboxes[1] = bboxes[1] - bboxes[3] / 2
          new_bboxes[2] = bboxes[0] + bboxes[2] / 2
          new_bboxes[3] = bboxes[1] + bboxes[3] / 2
          return new_bboxes
      elif len(bboxes.shape) == 2:
          new_bboxes = np.empty_like(bboxes)
          new_bboxes[:, 0] = bboxes[:, 0] - bboxes[:, 2] / 2
          new_bboxes[:, 1] = bboxes[:, 1] - bboxes[:, 3] / 2
          new_bboxes[:, 2] = bboxes[:, 0] + bboxes[:, 2] / 2
          new_bboxes[:, 3] = bboxes[:, 1] + bboxes[:, 3] / 2
          return new_bboxes
      else:
          raise ValueError
  
imports: import os
  import re
  import cv2
  import glob
  import copy
  import math
  import pickle
  import numpy
  from shapely.geometry import Polygon, MultiPoint
label_desc: Use image node_id 2 for calling a global function with example usage: xywh2xyxy(bboxes) and returns: new_bboxes, new_bboxes