code: def test_transforms(self, mock_sample):
      mock_sample.side_effect = [0, 1, 2]
      transform = TextDetRandomCropFlip(crop_ratio=1.0, iter_num=3)
      results = transform(self.data_info2)
      self.assertTrue(
          np.allclose(results["img"], self.data_info2["img"])
      )
      self.assertTrue(
          np.allclose(
              results["gt_polygons"], self.data_info2["gt_polygons"]
          )
      )
      self.assertEqual(
          len(results["gt_bboxes"]), len(results["gt_polygons"])
      )
      self.assertTrue(
          poly2shapely(results["gt_polygons"][0]).equals(
              poly2shapely(bbox2poly(results["gt_bboxes"][0]))
          )
      )
  
imports: import copy
  import unittest
  import unittest.mock
  import numpy
  from mmcv.transforms import Pad, RandomResize
  from mmocr.datasets.transforms import BoundedScaleAspectJitter, RandomCrop, RandomFlip, Resize, ShortScaleAspectJitter, SourceImagePad, TextDetRandomCrop, TextDetRandomCropFlip
  from mmocr.utils import bbox2poly, poly2shapely
label_desc: Use image node_id 3 for calling the TestTextDetRandomCropFlip obj's underlying member method code with example usage: obj.test_transforms(mock_sample) without return types