code: def nms_cpu(dets, thresh):
      dets = dets.cpu()
      x1 = dets[:, 0]
      y1 = dets[:, 1]
      x2 = dets[:, 2]
      y2 = dets[:, 3]
      scores = dets[:, 4]
  
      areas = (x2 - x1 + 1) * (y2 - y1 + 1)
      order = scores.sort(0, descending=True)[1]
      # order = torch.from_numpy(np.ascontiguousarray(scores.numpy().argsort()[::-1])).long()
  
      keep = torch.LongTensor(dets.size(0))
      num_out = torch.LongTensor(1)
      nms.cpu_nms(keep, num_out, dets, order, areas, thresh)
  
      return keep[: num_out[0]]
  
imports: import torch
  from ._ext import nms
label_desc: Use image node_id 2 for calling a global function with example usage: nms_cpu(dets, thresh) and returns: keep