code: def nms(dets, thresh, use_gpu_nms=True, device_id=0):
      """
      Dispatches the call to either CPU or GPU NMS implementations
      """
      if dets.shape[0] == 0:
          return []
      if gpu_nms_available and use_gpu_nms:
          return gpu_nms(dets, thresh, device_id=device_id)
      else:
          return cpu_nms(dets, thresh)
  
imports: import numpy
  from utils.cython_modules.cpu_nms import cpu_nms
label_desc: Use image node_id 1 for calling a global function with example usage: nms(dets, thresh, use_gpu_nms, device_id) and returns: list, gpu_nms, cpu_nms