code: def batched_nms(boxes, scores, idxs, iou_threshold):
      if boxes.size == 0:
          return ivy.array([], dtype=ivy.int64)
      else:
          max_coordinate = boxes.max()
          boxes_dtype = boxes.dtype
          offsets = idxs.astype(boxes_dtype) * (
              max_coordinate + ivy.array(1, dtype=boxes_dtype)
          )
          boxes_for_nms = boxes + offsets[:, None]
          keep = nms(boxes_for_nms, scores, iou_threshold)
          return keep
  
file_path: ivy/ivy/functional/frontends/torchvision/ops.py
imports: import ivy
  from ivy.functional.frontends.torch.func_wrapper import to_ivy_arrays_and_back
  from ivy.func_wrapper import with_supported_dtypes, with_unsupported_device_and_dtypes
label_desc: Use image node_id 1 for calling a global function with example usage: batched_nms(boxes, scores, idxs, iou_threshold) and returns: ivy, keep