code: def test_init(self):
      # factor is int
      transform = PyramidRescale(factor=4, randomize_factor=False)
      self.assertEqual(transform.factor, 4)
      # factor is float
      with self.assertRaisesRegex(
          TypeError, "`factor` should be an integer"
      ):
          PyramidRescale(factor=4.0)
      # invalid base_shape
      with self.assertRaisesRegex(
          TypeError, "`base_shape` should be a list or tuple"
      ):
          PyramidRescale(base_shape=128)
      with self.assertRaisesRegex(
          ValueError, "`base_shape` should contain two integers"
      ):
          PyramidRescale(base_shape=(128,))
      with self.assertRaisesRegex(
          ValueError, "`base_shape` should contain two integers"
      ):
          PyramidRescale(base_shape=(128.0, 2.0))
      # invalid randomize_factor
      with self.assertRaisesRegex(
          TypeError, "`randomize_factor` should be a bool"
      ):
          PyramidRescale(randomize_factor=None)
  
imports: import copy
  import unittest
  import numpy
  from parameterized import parameterized
  from mmocr.datasets.transforms import CropHeight, ImageContentJitter, PadToWidth, PyramidRescale, RescaleToHeight, ReversePixels, TextRecogGeneralAug
label_desc: Use image node_id 2 for calling the TestPyramidRescale obj's underlying member method code with example usage: obj.test_init() without return types