code: def test_poly_nms(self):
      base_postprocessor = BaseTextDetPostProcessor(
          text_repr_type="poly"
      )
      polygons = [
          np.array([0.0, 0.0, 10.0, 0.0, 10.0, 10.0, 0.0, 10.0]),
          np.array([5.0, 0.0, 15.0, 0.0, 15.0, 10.0, 5.0, 10.0]),
      ]
      scores = [0.9, 0.8]
      keep = base_postprocessor.poly_nms(polygons, scores, 0.6)
  
      self.assertEqual(len(keep[0]), 2)
      self.assertTrue(np.allclose(keep[0][0], polygons[0]))
      self.assertTrue(np.allclose(keep[0][1], polygons[1]))
  
      keep = base_postprocessor.poly_nms(polygons, scores, 0.2)
      self.assertEqual(len(keep[0]), 1)
      self.assertTrue(np.allclose(keep[0][0], polygons[0]))
  
file_path: mmocr/tests/test_models/test_textdet/test_postprocessors/test_base_postprocessor.py
imports: import unittest
  from unittest import mock
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmocr.models.textdet.postprocessors import BaseTextDetPostProcessor
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 6 for calling the TestBaseTextDetPostProcessor obj's underlying member method code with example usage: obj.test_poly_nms() without return types