code: def test_get_polygons_image(self):
      polygons = [
          np.array([0, 0, 10, 10, 20, 20, 30, 30]).reshape(-1, 2)
      ]
      image = np.zeros((40, 40, 3), dtype=np.uint8)
      polygons_image = BaseLocalVisualizer().get_polygons_image(
          image, polygons, colors=["r", "r", "r", "r"]
      )
      self.assertEqual(polygons_image.shape, (40, 40, 3))
  
      polygons_image = BaseLocalVisualizer().get_polygons_image(
          image, polygons, colors=["r", "r", "r", "r"], filling=True
      )
      self.assertEqual(polygons_image.shape, (40, 40, 3))
  
file_path: mmocr/tests/test_visualization/test_base_visualizer.py
imports: from unittest import TestCase
  import numpy
  from mmocr.visualization import BaseLocalVisualizer
label_desc: Use image node_id 2 for calling the TestBaseLocalVisualizer obj's underlying member method code with example usage: obj.test_get_polygons_image() without return types