code: def oks_nms(kpts_db, thresh, sigmas=None, in_vis_thre=None):
      """greedily select boxes with high confidence and overlap with current maximum <= thresh
      rule out overlap >= thresh
  
      Args:
          kpts_db (list): The predicted keypoints within the image
          thresh (float): The threshold to select the boxes
          sigmas (np.array): The variance to calculate the oks iou
              Default: None
          in_vis_thre (float): The threshold to select the high confidence boxes
              Default: None
  
      Return:
          keep (list): indexes to keep
      """
  
      if len(kpts_db) == 0:
          return []
  
      scores = np.array(
          [kpts_db[i]["score"] for i in range(len(kpts_db))]
      )
      kpts = np.array(
          [
              kpts_db[i]["keypoints"].flatten()
              for i in range(len(kpts_db))
          ]
      )
      areas = np.array(
          [kpts_db[i]["area"] for i in range(len(kpts_db))]
      )
  
      order = scores.argsort()[::-1]
  
      keep = []
      while order.size > 0:
          i = order[0]
          keep.append(i)
  
          oks_ovr = oks_iou(
              kpts[i],
              kpts[order[1:]],
              areas[i],
              areas[order[1:]],
              sigmas,
              in_vis_thre,
          )
  
          inds = np.where(oks_ovr <= thresh)[0]
          order = order[inds + 1]
  
      return keep
  
imports: import cv2
  import numpy
  import paddle.nn.functional
label_desc: Use image node_id 11 for calling a global function with example usage: oks_nms(kpts_db, thresh, sigmas, in_vis_thre) and returns: keep, list