code: def test_get_text_instances(self, text_repr_type):
      postprocessor = FCEPostprocessor(
          fourier_degree=5,
          num_reconstr_points=20,
          score_thr=0.3,
          text_repr_type=text_repr_type,
      )
      pred_result = [
          dict(
              cls_res=torch.rand(4, 10, 10),
              reg_res=torch.rand(22, 10, 10),
          ),
          dict(
              cls_res=torch.rand(4, 20, 20),
              reg_res=torch.rand(22, 20, 20),
          ),
          dict(
              cls_res=torch.rand(4, 30, 30),
              reg_res=torch.rand(22, 30, 30),
          ),
      ]
      data_sample = TextDetDataSample(
          gt_instances=InstanceData(
              polygons=[
                  np.array([0, 0, 0, 1, 2, 1, 2, 0]),
                  np.array([1, 1, 1, 2, 3, 2, 3, 1]),
              ]
          )
      )
      results = postprocessor.get_text_instances(
          pred_result, data_sample
      )
      self.assertIn("polygons", results.pred_instances)
      self.assertIn("scores", results.pred_instances)
      self.assertTrue(
          isinstance(results.pred_instances.scores, torch.FloatTensor)
      )
      self.assertEqual(
          len(results.pred_instances.scores),
          len(results.pred_instances.polygons),
      )
      if len(results.pred_instances.polygons) > 0:
          if text_repr_type == "poly":
              self.assertEqual(
                  results.pred_instances.polygons[0].shape, (40,)
              )
          else:
              self.assertEqual(
                  results.pred_instances.polygons[0].shape, (8,)
              )
  
file_path: mmocr/tests/test_models/test_textdet/test_postprocessors/test_fce_postprocessor.py
imports: import unittest
  import numpy
  import torch
  from mmengine.structures import InstanceData
  from parameterized import parameterized
  from mmocr.models.textdet.postprocessors import FCEPostprocessor
  from mmocr.structures import TextDetDataSample
label_desc: Use image node_id 2 for calling the TestFCEPostProcessor obj's underlying member method code with example usage: obj.test_get_text_instances(text_repr_type) without return types