code: def decode(self, probabilities) -> Prediction:
      last_char = self.blank
      chars = np.argmax(probabilities, axis=1)
      sentence = []
      for idx, c in enumerate(chars):
          if c != self.blank:
              if c != last_char:
                  sentence.append((c, idx, idx + 1))
              else:
                  _, start, end = sentence[-1]
                  del sentence[-1]
                  sentence.append((c, start, idx + 1))
  
          last_char = c
  
      return self.find_alternatives(
          probabilities, sentence, self.threshold
      )
  
file_path: calamari/calamari_ocr/ocr/model/ctcdecoder/default_ctc_decoder.py
imports: import numpy
  from calamari_ocr.ocr.model.ctcdecoder.ctc_decoder import CTCDecoder
  from calamari_ocr.ocr.predict.params import Prediction
label_desc: Use image node_id 2 for calling the DefaultCTCDecoder obj's underlying member method code with example usage: obj.decode(probabilities) and returns: self