code: def _compute_max_ious(doc, field1, field2, **kwargs):
      if field1 != field2:
          labels1 = _get_labels(doc, field1)
          labels2 = _get_labels(doc, field2)
  
          ious = compute_ious(labels1, labels2, **kwargs)
  
          return _extract_max_ious(ious, labels1, labels2)
  
      labels = _get_labels(doc, field1)
  
      if labels is None:
          return None, None, None, None
  
      n = len(labels)
  
      if n < 2:
          return [None] * n, [None] * n, [None] * n, [None] * n
  
      ious = compute_ious(labels, labels, **kwargs)
      np.fill_diagonal(ious, -1)  # exclude self
  
      return _extract_max_ious(ious, labels, labels)
  
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 5 for calling a global function with example usage: _compute_max_ious(doc, field1, field2) and returns: _extract_max_ious, _extract_max_ious, None,  None,  None,  None, unknown,  unknown,  unknown,  unknown