code: def _find_duplicates(doc, field, iou_thresh, method, **kwargs):
      labels = _get_labels(doc, field)
  
      if labels is None:
          return []
  
      ious = compute_ious(labels, labels, **kwargs)
  
      if method == "simple":
          dup_inds = _find_duplicates_simple(ious, iou_thresh)
      elif method == "greedy":
          dup_inds = _find_duplicates_greedy(ious, iou_thresh)
      else:
          raise ValueError("Unsupported method '%s'" % method)
  
      return [labels[i].id for i in dup_inds]
  
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 8 for calling a global function with example usage: _find_duplicates(doc, field, iou_thresh, method) and returns: unknown, list