code: def test_detections_per_im(self, det_per_im, gc):
      in_centers = [(0, 0), (20, 20), (50, 50)]
      in_scores = [0.7, 0.85, 0.6]
      boxes, scores = gen_multiple_boxes(in_centers, in_scores, 10, 2)
  
      gt_centers = [(20, 20), (0, 0), (50, 50)][:det_per_im]
      gt_scores = [0.85, 0.7, 0.6][:det_per_im]
      gt_boxes, gt_scores = gen_multiple_boxes(
          gt_centers, gt_scores, 1, 1
      )
      gt_classes = np.ones(gt_boxes.shape[0], dtype=np.float32)
  
      op = get_op(
          2,
          3,
          {
              "score_thresh": 0.5,
              "nms": 0.9,
              "detections_per_im": det_per_im,
          },
      )
  
      def ref(*args, **kwargs):
          return (gt_scores.flatten(), gt_boxes, gt_classes)
  
      self.assertReferenceChecks(gc, op, [scores, boxes], ref)
  
file_path: pytorch/caffe2/python/operator_test/box_with_nms_limit_op_test.py
imports: from caffe2.python import core
  import caffe2.python.hypothesis_test_util
  import caffe2.python.serialized_test.serialized_test_util
  from hypothesis import given, settings
  import hypothesis.strategies
  import unittest
  import numpy
label_desc: Use image node_id 3 for calling the TestBoxWithNMSLimitOp obj's underlying member method code with example usage: obj.test_detections_per_im(det_per_im, gc) and returns: gt_scores,  gt_boxes,  gt_classes