code: def test_non_max_suppression_mr(self):
      scores = np.array(
          [
              [0, 1, 0, 0, 0, 0, 0, 0],
              [0, 0, 1, 0, 0, 0, 0, 0],
              [0, 0, 0, 0, 1, 1, 0, 0],
              [0, 0, 0, 0, 0, 0, 0, 1],
          ]
      )
      segments = np.array(
          [
              [
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
                  [1, 2],
              ],
              [
                  [3, 5],
                  [3, 5],
                  [3, 5],
                  [3, 5],
                  [3, 5],
                  [3, 5],
                  [3, 5],
                  [3, 5],
              ],
              [
                  [8, 10],
                  [8, 10],
                  [8, 10],
                  [8, 10],
                  [8, 10],
                  [8, 10],
                  [8, 10],
                  [8, 10],
              ],
              [
                  [13, 14],
                  [13, 14],
                  [13, 14],
                  [13, 14],
                  [13, 14],
                  [13, 14],
                  [13, 14],
                  [13, 14],
              ],
          ]
      )
      (
          out_scores,
          out_segments,
      ) = postprocessing_utils.non_max_suppression_mr(
          scores,
          segments,
          config=ml_collections.ConfigDict(
              {
                  "max_detection": 100,
                  "iou_threshold": 0.9,
                  "score_threshold": 0.001,
                  "soft_nms_sigma": 0.75,
              }
          ),
      )
      expected_out_scores = [
          np.array([1.0]),
          np.array([1.0]),
          np.array([1.0, 0.5134171]),
          np.array([1.0]),
      ]
      expected_out_segments = [
          np.array([[1, 2]]),
          np.array([[3, 5]]),
          np.array([[8, 10], [8, 10]]),
          np.array([[13, 14]]),
      ]
      self.assertAllClose(out_scores, expected_out_scores)
      self.assertAllClose(out_segments, expected_out_segments)
  
      caption_mask = np.array(
          [1, 1, 1, 1, 0],
          dtype=np.int32,
      )
      gt_segments = np.array(
          [[1, 2], [3, 5], [8, 10], [13, 14], [-1000, -1000]]
      )
      gt_segments = gt_segments[caption_mask.astype(bool)]
      result = metrics.compute_recall_at_k(
          gt_segments, out_segments, out_scores, [1, 5], [0.5, 0.7]
      )
      scores_out = [score for _, score in result.items()]
      self.assertAllClose(scores_out, [1.0, 1.0, 1.0, 1.0])
  
file_path: scenic/scenic/projects/unloc/postprocessing_utils_test.py
imports: from absl.testing import parameterized
  import ml_collections
  import numpy
  from scenic.projects.unloc import metrics
  from scenic.projects.unloc import postprocessing_utils
  import tensorflow
label_desc: Use image node_id 6 for calling the PostprocessingUtilsTest obj's underlying member method code with example usage: obj.test_non_max_suppression_mr() without return types