code: def oks_nms(boxlist, thresh, sigmas=None, in_vis_thre=None):
      """
      greedily select boxes with high confidence and overlap with current maximum <= thresh
      rule out overlap >= thresh, overlap = oks
      :param kpts_db
      :param thresh: retain overlap < thresh
      :return: indexes to keep
      """
      if len(boxlist) == 0:
          return boxlist
  
      kpts = (
          boxlist.pred_keypoints.reshape(len(boxlist), -1).cpu().numpy()
      )
      boxes = boxlist.pred_boxes.tensor
      areas = (
          (
              (boxes[:, 2] - boxes[:, 0] + 1)
              * (boxes[:, 3] - boxes[:, 1] + 1)
          )
          .cpu()
          .numpy()
      )
  
      # scores = boxlist.scores
      # order = scores.argsort()[::-1]
      order = np.arange(0, len(boxlist))
  
      keep = []
      while len(order) > 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 boxlist[keep]
  
file_path: gluon-cv/gluoncv/torch/nn/nms.py
imports: import numpy
  import torch
  from torchvision.ops import boxes
  from torchvision.ops import nms
label_desc: Use image node_id 5 for calling a global function with example usage: oks_nms(boxlist, thresh, sigmas, in_vis_thre) and returns: boxlist, boxlist