code: def _compute_bbox_iou(gt, pred, gt_crowd=False):
      gx, gy, gw, gh = gt.bounding_box
      gt_area = gh * gw
  
      px, py, pw, ph = pred.bounding_box
      pred_area = ph * pw
  
      # Width of intersection
      w = min(px + pw, gx + gw) - max(px, gx)
      if w <= 0:
          return 0
  
      # Height of intersection
      h = min(py + ph, gy + gh) - max(py, gy)
      if h <= 0:
          return 0
  
      inter = h * w
  
      if gt_crowd:
          union = pred_area
      else:
          union = pred_area + gt_area - inter
  
      return min(etan.safe_divide(inter, union), 1)
  
imports: import contextlib
  import itertools
  import logging
  import numpy
  import scipy.spatial
  import eta.core.numutils
  import eta.core.utils
  import fiftyone.core.labels
  import fiftyone.core.utils
  import fiftyone.core.validation
  from .utils3d import compute_cuboid_iou
label_desc: Use image node_id 12 for calling a global function with example usage: _compute_bbox_iou(gt, pred, gt_crowd) and returns: min, int, int