code: def test_txt_dataset(self):
      # test initialization
      dataset = RecogTextDataset(
          ann_file="tests/data/rec_toy_dataset/old_label.txt",
          data_prefix=dict(img_path="imgs"),
          parser_cfg=dict(
              type="LineStrParser",
              keys=["filename", "text"],
              keys_idx=[0, 1],
          ),
          pipeline=[],
      )
      dataset.full_init()
      self.assertEqual(len(dataset), 10)
      self.assertEqual(len(dataset.load_data_list()), 10)
  
      # test load_data_list
      anno = dataset.load_data_list()
      self.assertIn(
          anno[0]["img_path"], ["imgs/1223731.jpg", "imgs\\1223731.jpg"]
      )
      self.assertEqual(anno[0]["instances"][0]["text"], "GRAND")
      self.assertIn(
          anno[1]["img_path"], ["imgs/1223733.jpg", "imgs\\1223733.jpg"]
      )
  
      self.assertEqual(anno[1]["instances"][0]["text"], "HOTEL")
  
imports: from unittest import TestCase
  from mmocr.datasets import RecogTextDataset
label_desc: Use image node_id 1 for calling the TestRecogTextDataset obj's underlying member method code with example usage: obj.test_txt_dataset() without return types