class_docstr: The class generates a dictionary for recognition. It pre-defines four
  special tokens: ``start_token``, ``end_token``, ``pad_token``, and
  ``unknown_token``, which will be sequentially placed at the end of the
  dictionary when their corresponding flags are True.
  
  Args:
      dict_file (str): The path of Character dict file which a single
          character must occupies a line.
      num_bins (int): Number of bins dividing the image, which is used to
          shift the character indexes. Defaults to 1000.
      with_start (bool): The flag to control whether to include the start
          token. Defaults to False.
      with_end (bool): The flag to control whether to include the end token.
          Defaults to False.
      with_seq end (bool): The flag to control whether to include the
          sequence end token. Defaults to False.
      same_start_end (bool): The flag to control whether the start token and
          end token are the same. It only works when both ``with_start`` and
          ``with_end`` are True. Defaults to False.
      with_padding (bool):The padding token may represent more than a
          padding. It can also represent tokens like the blank token in CTC
          or the background token in SegOCR. Defaults to False.
      with_unknown (bool): The flag to control whether to include the
          unknown token. Defaults to False.
      start_token (str): The start token as a string. Defaults to '<BOS>'.
      end_token (str): The end token as a string. Defaults to '<EOS>'.
      seq_end_token (str): The sequence end token as a string. Defaults to
          '<SEQEOS>'.
      start_end_token (str): The start/end token as a string. if start and
          end is the same. Defaults to '<BOS/EOS>'.
      padding_token (str): The padding token as a string.
          Defaults to '<PAD>'.
      unknown_token (str, optional): The unknown token as a string. If it's
          set to None and ``with_unknown`` is True, the unknown token will be
          skipped when converting string to index. Defaults to '<UKN>'.
docstr: Convert a list of index to string.
  
  Args:
      index (list[int]): The list of indexes to convert to string.
  
  Return:
      str: The converted string.
docstr_tok: ["Convert","a","list","of","index","to","string",".","Args",":","index","(","list","[","int","]",")",":","The","list","of","indexes","to","convert","to","string",".","Return",":","str",":","The","converted","string","."]
code: def idx2str(self, index: Sequence[int]) -> str:
      """Convert a list of index to string.
  
      Args:
          index (list[int]): The list of indexes to convert to string.
  
      Return:
          str: The converted string.
      """
      assert isinstance(index, (list, tuple))
      string = ""
      for i in index:
          assert i < self.num_classes, (
              f"Index: {i} out of range! Index "
              f"must be less than {self.num_classes}"
          )
          # TODO: find its difference from ignore_chars
          # in TextRecogPostprocessor
          shifted_i = i - self.num_bins
          if self._dict[shifted_i] is not None:
              string += self._dict[shifted_i]
      return string
  
file_path: mmocr/projects/SPTS/spts/model/spts_dictionary.py
imports: from typing import Sequence
  from mmocr.models.common.dictionary import Dictionary
  from mmocr.registry import TASK_UTILS
label_desc: Use image node_id 5 for calling the SPTSDictionary obj's underlying member method code with example usage: obj.idx2str(index) and returns: string