code: def _compute_polyline_similarities(preds, gts, classwise=False):
      sims = np.zeros((len(preds), len(gts)))
      for j, gt in enumerate(gts):
          for i, pred in enumerate(preds):
              if classwise and pred.label != gt.label:
                  continue
  
              gtp = list(itertools.chain.from_iterable(gt.points))
              predp = list(itertools.chain.from_iterable(pred.points))
              sims[i, j] = _compute_object_keypoint_similarity(
                  gtp, predp
              )
  
      return sims
  
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 15 for calling a global function with example usage: _compute_polyline_similarities(preds, gts, classwise) and returns: sims