code: def test_flip(self):
      t = RandomFlip(prob=1.0, direction="horizontal")
      results = t(self.data_info.copy())
      self.assertEqual(results["img"].shape, (30, 40, 3))
      self.assertEqual(results["img_shape"], (30, 40))
      self.assertTrue(
          (
              results["gt_polygons"][0]
              == np.array(
                  [30.0, 5.0, 20.0, 5.0, 20.0, 10.0, 30.0, 10.0]
              )
          ).all()
      )
  
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 TestRandomFlip obj's underlying member method code with example usage: obj.test_flip() without return types