code: def test_idx2str(self):
      with tempfile.TemporaryDirectory() as tmp_dir:
          # create dummy data
          dict_file = osp.join(tmp_dir, "fake_chars.txt")
          create_dummy_dict_file(dict_file)
          dict_gen = Dictionary(dict_file=dict_file)
          self.assertEqual(dict_gen.idx2str([0, 1, 2, 3, 4]), "01234")
          with self.assertRaises(AssertionError):
              dict_gen.idx2str("01234")
          with self.assertRaises(AssertionError):
              dict_gen.idx2str([40])
  
file_path: mmocr/tests/test_models/test_textrecog/test_dictionary/test_dictionary.py
imports: import os.path
  import tempfile
  from unittest import TestCase
  from mmocr.models.common import Dictionary
  from mmocr.testing import create_dummy_dict_file
label_desc: Use image node_id 5 for calling the TestDictionary obj's underlying member method code with example usage: obj.test_idx2str() without return types