code: def _polylines_to_detections(polylines):
      detections = []
      for polyline in polylines:
          detection = polyline.to_detection()
  
          detection.id = polyline.id  # keep same ID
          detections.append(detection)
  
      return detections
  
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 20 for calling a global function with example usage: _polylines_to_detections(polylines) and returns: detections