code: def nms_gpu(dets, thresh):
      """
      dets has to be a tensor
      """
  
      scores = dets[:, -1]
      order = scores.sort(0, descending=True)[1]
      dets = dets[order].contiguous()
  
      keep = torch.LongTensor(dets.size(0))
      num_out = torch.LongTensor(1)
      nms.gpu_nms(keep, num_out, dets, thresh)
      return order[keep[: num_out[0]].cuda()].contiguous()
  
imports: import torch
  from ._ext import nms
label_desc: Use image node_id 1 for calling a global function with example usage: nms_gpu(dets, thresh) and returns: order