code: def _test_polygons(self, mock_sample):
      # test random rotate for polygons
      # returns 1. for random_sample() in _sample_angle(), i.e., angle = 90
      mock_sample.side_effect = [1.0]
      transform = RandomRotate(max_angle=90, use_canvas=True)
      results = transform(copy.deepcopy(self.data_info3))
      self.assertTrue(
          np.allclose(
              results["gt_polygons"][0],
              np.array(
                  [10.0, 20.0, 10.0, 10.0, 20.0, 10.0, 20.0, 20.0]
              ),
          )
      )
      self.assertEqual(
          results["img"].shape, self.data_info3["img"].shape
      )
  
imports: import copy
  import unittest
  import unittest.mock
  import numpy
  from mmocr.datasets.transforms import FixInvalidPolygon, RandomCrop, RandomRotate, RemoveIgnored, Resize
  from mmocr.utils import poly2shapely
label_desc: Use image node_id 6 for calling the TestRandomRotate obj's underlying member method code with example usage: obj._test_polygons(mock_sample) without return types