code: def test_rescale(self):
      data_sample = TextDetDataSample()
      data_sample.pred_instances = InstanceData()
      data_sample.pred_instances.polygons = [
          np.array([0, 0, 0, 1, 1, 1, 1, 0])
      ]
  
      base_postprocessor = BaseTextDetPostProcessor(
          text_repr_type="poly", rescale_fields=["polygons"]
      )
      rescaled_data_sample = base_postprocessor.rescale(
          data_sample, (0.5, 1)
      )
      self.assertTrue(
          np.array_equal(
              rescaled_data_sample.pred_instances.polygons,
              [[0, 0, 0, 1, 2, 1, 2, 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 3 for calling the TestBaseTextDetPostProcessor obj's underlying member method code with example usage: obj.test_rescale() without return types