code: def test_comps2polys(self):
      postprocessor = DRRGPostprocessor()
  
      x1 = np.arange(2, 18, 2)
      x2 = x1 + 2
      y1 = np.ones(8) * 2
      y2 = y1 + 2
      comp_scores = np.ones(8, dtype=np.float32) * 0.9
      text_comps = np.stack(
          [x1, y1, x2, y1, x2, y2, x1, y2, comp_scores]
      ).transpose()
      comp_labels = np.array([1, 1, 1, 1, 1, 3, 5, 5])
      shuffle = [3, 2, 5, 7, 6, 0, 4, 1]
  
      boundaries = postprocessor._comps2polys(
          text_comps[shuffle], comp_labels[shuffle]
      )
      self.assertEqual(len(boundaries[0]), 3)
  
      boundaries = postprocessor._comps2polys(
          text_comps[[]], comp_labels[[]]
      )
      self.assertEqual(len(boundaries[0]), 0)
  
file_path: mmocr/tests/test_models/test_textdet/test_postprocessors/test_drrg_postprocessor.py
imports: import unittest
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from mmocr.models.textdet.postprocessors import DRRGPostprocessor
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 2 for calling the TestDRRGPostProcessor obj's underlying member method code with example usage: obj.test_comps2polys() without return types