class_docstr: Convert between text-label and text-index 
class_docstr_tok: ["Convert","between","text-label","and","text-index"]
docstr: convert text-index into text-label. 
docstr_tok: ["convert","text-index","into","text-label","."]
code: def decode(
      self, text_index, text_prob=None, is_remove_duplicate=False
  ):
      """convert text-index into text-label."""
      result_list = []
      ignored_tokens = self.get_ignored_tokens()
      batch_size = len(text_index)
      for batch_idx in range(batch_size):
          char_list = []
          conf_list = []
          for idx in range(len(text_index[batch_idx])):
              if text_index[batch_idx][idx] in ignored_tokens:
                  continue
              if is_remove_duplicate:
                  # only for predict
                  if (
                      idx > 0
                      and text_index[batch_idx][idx - 1]
                      == text_index[batch_idx][idx]
                  ):
                      continue
              char_list.append(
                  self.character[int(text_index[batch_idx][idx])]
              )
              if text_prob is not None:
                  conf_list.append(text_prob[batch_idx][idx])
              else:
                  conf_list.append(1)
          text = "".join(char_list)
          result_list.append((text, np.mean(conf_list)))
      return result_list
  
imports: import cv2
  import copy
  import numpy
  import math
  import re
  import sys
  import argparse
  import string
  from copy import deepcopy
label_desc: Use image node_id 3 for calling the BaseRecLabelDecode obj's underlying member method code with example usage: obj.decode(text_index, text_prob, is_remove_duplicate) and returns: result_list