code: def test_pair_text_gatherer(self):
      root = tempfile.TemporaryDirectory()
      data_root = root.name
      img_dir = "dummy_img"
      ann_dir = "dummy_ann"
      split = "train"
      img = np.random.randint(0, 100, size=(100, 100, 3))
      os.makedirs(osp.join(data_root, img_dir))
      os.makedirs(osp.join(data_root, ann_dir))
      for i in range(10):
          cv2.imwrite(osp.join(data_root, img_dir, f"img_{i}.jpg"), img)
          f = open(osp.join(data_root, ann_dir, f"img_{i}.txt"), "w")
          f.close()
      f = open(osp.join(data_root, ann_dir, "img_10.mmocr"), "w")
      f.close()
      gatherer = PairGatherer(
          data_root=data_root,
          img_dir=img_dir,
          ann_dir=ann_dir,
          split=split,
          img_suffixes=[".jpg"],
          rule=[r"img_(\d+)\.([jJ][pP][gG])", r"img_\1.txt"],
      )
      img_list, ann_list = gatherer()
      self.assertEqual(len(img_list), 10)
      self.assertEqual(len(ann_list), 10)
      self.assertNotIn(
          osp.join(data_root, ann_dir, "img_10.mmocr"), ann_list
      )
      root.cleanup()
  
file_path: mmocr/tests/test_datasets/test_preparers/test_gatherers/test_pair_gatherer.py
imports: import os
  import os.path
  import tempfile
  import unittest
  import cv2
  import numpy
  from mmocr.datasets.preparers.gatherers import PairGatherer
label_desc: Use image node_id 1 for calling the TestPairGatherer obj's underlying member method code with example usage: obj.test_pair_text_gatherer() without return types