code: def box_iou(boxes1: np.array, boxes2: np.array) -> np.array:
      """
      Return intersection-over-union (Jaccard index) of boxes.
  
      Both sets of boxes are expected to be in ``(x1, y1, x2, y2)`` format with
      ``0 <= x1 < x2`` and ``0 <= y1 < y2``.
  
      Args:
          boxes1 (Tensor[N, 4])
          boxes2 (Tensor[M, 4])
  
      Returns:
          iou (Tensor[N, M]): the NxM matrix containing the pairwise IoU values for every element in boxes1 and boxes2
      """
      inter, union = _box_inter_union(boxes1, boxes2)
      iou = inter / union
      return iou
  
imports: import xml.etree.ElementTree
  from collections import defaultdict
  from pathlib import Path
  from typing import Any, Dict, List, Optional, Sequence, Tuple, Union
  import numpy
  from prettytable import PrettyTable
  from tqdm import tqdm
  import json
  import os
  import re
label_desc: Use image node_id 8 for calling a global function with example usage: box_iou(boxes1, boxes2) and returns: iou