code: def iou_one_to_multiple(box, boxes):
      """
      Calculate the Intersection over Union (IoU) of a bounding box with a batch of bounding boxes.
  
      Args:
          box (list of 4 floats): [xmin, ymin, w, h]
          boxes (list of N lists of 4 floats): [[xmin, ymin, w, h], [xmin, ymin, w, h], ...]
  
      Returns:
          list of N floats: the IoU of the box with each of the boxes in the batch
      """
      boxes = np.array(boxes, dtype=np.float32).reshape([-1, 4])
      x1 = np.maximum(box[0], boxes[:, 0])
      y1 = np.maximum(box[1], boxes[:, 1])
      x2 = np.minimum(box[0] + box[2], boxes[:, 0] + boxes[:, 2])
      y2 = np.minimum(box[1] + box[3], boxes[:, 1] + boxes[:, 3])
      intersection_area = np.maximum(0, x2 - x1 + 1) * np.maximum(
          0, y2 - y1 + 1
      )
      box_area = box[2] * box[3]
      boxes_area = boxes[:, 2] * boxes[:, 3]
      union_area = box_area + boxes_area - intersection_area
      iou = intersection_area / union_area
      return iou
  
imports: import numpy
  from PIL import Image, ImageDraw
label_desc: Use image node_id 4 for calling a global function with example usage: iou_one_to_multiple(box, boxes) and returns: iou