code: def _test_bboxes(self, mock_sample):
      # test random rotate for bboxes
      # 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_info2))
      self.assertTrue(
          np.allclose(
              results["gt_bboxes"][0], np.array([10, 10, 20, 20])
          )
      )
      self.assertTrue(
          np.allclose(
              results["gt_bboxes"][1], np.array([5, 20, 10, 25])
          )
      )
      self.assertEqual(
          results["img"].shape, self.data_info2["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 5 for calling the TestRandomRotate obj's underlying member method code with example usage: obj._test_bboxes(mock_sample) without return types