code: def _compute_object_keypoint_similarity(gtp, predp):
      gtp = np.asarray(gtp, dtype=float)
      predp = np.asarray(predp, dtype=float)
  
      # Use extent of GT points as proxy for box area
      scale = np.sqrt(
          np.prod(np.nanmax(gtp, axis=0) - np.nanmin(gtp, axis=0))
      )
      scale = np.maximum(0.0, np.minimum(scale, 1.0))
  
      # If GT points are None/nan/inf: skip
      # If pred points are None/nan/inf: use max distance
      dists = []
      for g, p in zip(gtp, predp):
          if not np.isfinite(g).all():
              continue
  
          if np.isfinite(p).all():
              d = sp.distance.euclidean(g, p)
          else:
              # Max distance
              d = 1
  
          dists.append(d)
  
      dists = np.array(dists)
      n = len(dists)
  
      if n == 0:
          return 0.0
  
      # object keypoint similarity with kappa == 1
      # https://cocodataset.org/#keypoints-eval
      return np.sum(np.exp(-(dists**2) / (2 * (scale**2)))) / n
  
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 19 for calling a global function with example usage: _compute_object_keypoint_similarity(gtp, predp) and returns: unknown, int