code: def test_icdar_dataset(self):
      tmp_dir = tempfile.TemporaryDirectory()
      # create dummy data
      fake_json_file = osp.join(tmp_dir.name, "fake_data.json")
      self._create_dummy_icdar_json(fake_json_file)
  
      # test initialization
      dataset = IcdarDataset(
          ann_file=fake_json_file,
          data_prefix=dict(img_path="imgs"),
          metainfo=self.metainfo,
          pipeline=[],
      )
      self.assertEqual(
          dataset.metainfo["classes"], self.metainfo["classes"]
      )
      dataset.full_init()
      self.assertEqual(len(dataset), 2)
      self.assertEqual(len(dataset.load_data_list()), 2)
  
      # test load_data_list
      anno = dataset.load_data_list()[0]
      self.assertEqual(len(anno["instances"]), 4)
      self.assertTrue("ignore" in anno["instances"][0])
      self.assertTrue("bbox" in anno["instances"][0])
      self.assertEqual(anno["instances"][0]["bbox_label"], 0)
      self.assertTrue("polygon" in anno["instances"][0])
      tmp_dir.cleanup()
  
file_path: mmocr/tests/test_datasets/test_icdar_dataset.py
imports: import os.path
  import tempfile
  from unittest import TestCase
  import mmengine
  from mmocr.datasets.icdar_dataset import IcdarDataset
label_desc: Use image node_id 2 for calling the TestIcdarDataset obj's underlying member method code with example usage: obj.test_icdar_dataset() without return types