code: def test_call(self, mock_get_single_prediction):
      def mock_func(output, data_sample):
          return [0, 1, 2], [0.8, 0.7, 0.9]
  
      tmp_dir = tempfile.TemporaryDirectory()
      dict_file = osp.join(tmp_dir.name, "fake_chars.txt")
      create_dummy_dict_file(dict_file)
      dict_cfg = dict(
          type="Dictionary",
          dict_file=dict_file,
          with_start=True,
          with_end=True,
          same_start_end=False,
          with_padding=True,
          with_unknown=True,
      )
      mock_get_single_prediction.side_effect = mock_func
      data_samples = [TextRecogDataSample()]
      postprocessor = BaseTextRecogPostprocessor(
          max_seq_len=None, dictionary=dict_cfg
      )
  
      # test decode output to index
      dummy_output = torch.Tensor([[[1, 100, 3, 4, 5, 6, 7, 8]]])
      data_samples = postprocessor(dummy_output, data_samples)
      self.assertEqual(data_samples[0].pred_text.item, "012")
      tmp_dir.cleanup()
  
file_path: mmocr/tests/test_models/test_textrecog/test_postprocessors/test_base_textrecog_postprocessor.py
imports: import os.path
  import tempfile
  from unittest import TestCase, mock
  import torch
  from mmocr.models.common.dictionary import Dictionary
  from mmocr.models.textrecog.postprocessors import BaseTextRecogPostprocessor
  from mmocr.structures import TextRecogDataSample
  from mmocr.testing import create_dummy_dict_file
label_desc: Use image node_id 2 for calling the TestBaseTextRecogPostprocessor obj's underlying member method code with example usage: obj.test_call(mock_get_single_prediction) and returns: list,  list