code: def compute_cuboid_iou(gt, pred, gt_crowd=False):
      """Computes the IoU between the given ground truth and predicted cuboids.
  
      Args:
          gt: a :class:`fiftyone.core.labels.Detection`
          pred: a :class:`fiftyone.core.labels.Detection`
          gt_crowd (False): whether the ground truth cuboid is a crowd
  
      Returns:
          the IoU, in ``[0, 1]``
      """
      gt_box = _Box(gt.rotation, gt.location, gt.dimensions)
      pred_box = _Box(pred.rotation, pred.location, pred.dimensions)
  
      intersection_points = _compute_intersection_points(
          gt_box, pred_box
      ) + _compute_intersection_points(pred_box, gt_box)
  
      if not intersection_points:
          return 0.0
  
      try:
          # pylint: disable=no-member
          inter = sp.ConvexHull(intersection_points).volume
      except Exception as e:
          msg = str(e)
          warnings.warn(msg)
          return 0.0
  
      if gt_crowd:
          union = pred_box.volume
      else:
          union = gt_box.volume + pred_box.volume - inter
  
      return min(etan.safe_divide(inter, union), 1)
  
imports: import itertools
  import logging
  import warnings
  import numpy
  import scipy.spatial
  import eta.core.numutils
  import fiftyone.core.fields
  import fiftyone.core.labels
  import fiftyone.core.media
  from fiftyone.core.sample import Sample
  import fiftyone.core.utils
  import fiftyone.core.validation
  from fiftyone.core.odm import DynamicEmbeddedDocument
  import fiftyone.utils.image
label_desc: Use image node_id 1 for calling a global function with example usage: compute_cuboid_iou(gt, pred, gt_crowd) and returns: min, int, int