code: def _nms_helper(draw, batched=False):
      img_width = draw(st.integers(250, 1250))
      img_height = draw(st.integers(250, 1250))
      num_boxes = draw(st.integers(5, 50))
      bbox = {}
      for _ in range(num_boxes):
          x1 = draw(st.integers(0, img_width - 20))
          w = draw(st.integers(5, img_width - x1))
          y1 = draw(st.integers(0, img_height - 20))
          h = draw(st.integers(5, img_height - y1))
          bbox[(x1, y1, x1 + w, y1 + h)] = draw(st.floats(0.1, 0.7))
      iou_threshold = draw(st.floats(0.2, 0.5))
      idxs = None
      if batched:
          bbox_len = len(bbox)
          num_of_categories = draw(
              st.integers(1, max(bbox_len // 2, 2))
          )
          idxs = np.arange(num_of_categories)
          idxs = np.random.choice(idxs, size=bbox_len)
      return (
          ["float32", "float32"],
          np.array(list(bbox.keys()), dtype=np.float32),
          np.array(list(bbox.values()), dtype=np.float32),
          iou_threshold,
          idxs,
      )
  
file_path: ivy/ivy_tests/test_ivy/test_frontends/test_torchvision/test_ops.py
imports: import numpy
  from hypothesis import strategies
  import ivy_tests.test_ivy.helpers
  from ivy_tests.test_ivy.helpers import handle_frontend_test
label_desc: Use image node_id 1 for calling a global function with example usage: _nms_helper(draw, batched) and returns: list,  np,  np,  iou_threshold,  idxs