code: def setUp(self):
      # All polygons are invalid w/o gt_bboxes
      self.data_info = dict(
          img=np.random.random((30, 40, 3)),
          gt_polygons=[
              np.array([0.0, 0.0, 10.0, 10.0, 10.0, 0.0, 0.0, 10.0]),
              np.array([0.0, 0.0, 10.0, 0.0, 0.0, 10.0, 5.0, 10.0]),
              np.array([0, 10]),
              np.array([0, 10, 0, 10, 10, 0, 0, 10]),
          ],
          gt_ignored=np.array([False, False, False, False], dtype=bool),
      )
      # All polygons are invalid with gt_bboxes
      # the third one can be recovered from gt_bboxes
      # the fourth one has no valid polygon and bbox
      self.data_info2 = dict(
          img=np.random.random((30, 40, 3)),
          gt_polygons=[
              np.array([0.0, 0.0, 10.0, 10.0, 10.0, 0.0]),
              np.array([0.0, 0.0, 10.0, 0.0, 0.0, 10.0]),
              np.array([0, 10, 0, 10, 10, 0, 0, 10]),
              np.array([0, 10, 0, 10, 10, 0, 0, 10]),
          ],
          gt_bboxes=np.array(
              [
                  [0.0, 0.0, 10.0, 10.0],
                  [0.0, 0.0, 10.0, 10.0],
                  [0, 0, 10, 10],
                  [0, 0, 0, 0],
              ]
          ),
          gt_ignored=np.array([False, False, False, False], dtype=bool),
      )
      # Contains all unfixable polygons
      self.data_info3 = dict(
          img=np.random.random((30, 40, 3)),
          gt_polygons=[
              np.array([0, 10]),
              np.array([0, 10, 0, 10, 10, 0, 0, 10]),
          ],
          gt_ignored=np.array([False, False], dtype=bool),
      )
      # The first one is valid, and the second one is invalid
      self.data_info4 = dict(
          img=np.random.random((30, 40, 3)),
          gt_polygons=[
              np.array([0.0, 0.0, 10.0, 0.0, 10.0, 10.0, 0.0, 10.0]),
              np.array([0, 10, 0, 10, 10, 0, 0, 10]),
          ],
          gt_ignored=np.array([False, False], dtype=bool),
      )
      # no gt_polygons
      self.data_info5 = dict(
          img=np.random.random((30, 40, 3)),
          gt_bboxes=np.array(
              [
                  [0.0, 0.0, 10.0, 10.0],
                  [0.0, 0.0, 10.0, 10.0],
                  [0, 0, 10, 10],
                  [0, 0, 0, 0],
              ]
          ),
          gt_ignored=np.array([False, False, False, False], dtype=bool),
      )
  
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 1 for calling the TestFixInvalidPolygon obj's underlying member method code with example usage: obj.setUp() without return types