code: def test_call(self, mock_get_text_instances):
      def mock_func(x, y, **kwargs):
          return y
  
      mock_get_text_instances.side_effect = mock_func
  
      pred_results = torch.Tensor([[0.1, 0.2], [0.3, 0.4]])
      data_samples = [
          TextDetDataSample(
              metainfo=dict(scale_factor=(0.5, 1)),
              pred_instances=InstanceData(
                  polygons=[np.array([0, 0, 0, 1, 2, 1, 2, 0])]
              ),
          ),
          TextDetDataSample(
              metainfo=dict(scale_factor=(1, 0.5)),
              pred_instances=InstanceData(
                  polygons=[
                      np.array([0, 0, 0, 1, 2, 1, 2, 0]),
                      np.array([1, 1, 1, 2, 3, 2, 3, 1]),
                  ]
              ),
          ),
      ]
      base_postprocessor = BaseTextDetPostProcessor(
          rescale_fields=["polygons"]
      )
      results = base_postprocessor(pred_results, data_samples)
      self.assertEqual(len(results), 2)
      self.assertTrue(
          np.array_equal(
              results[0].pred_instances.polygons,
              [np.array([0, 0, 0, 1, 4, 1, 4, 0])],
          )
      )
      self.assertTrue(
          np.array_equal(
              results[1].pred_instances.polygons,
              [
                  np.array([0, 0, 0, 2, 2, 2, 2, 0]),
                  np.array([1, 2, 1, 4, 3, 4, 3, 2]),
              ],
          )
      )
  
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 2 for calling the TestBaseTextDetPostProcessor obj's underlying member method code with example usage: obj.test_call(mock_get_text_instances) and returns: y