code: def wordToLabelSeq(w, classes):
      """map a word to a sequence of labels (indices)"""
      try:
          res = [classes.index(c) for c in w]
          return res
      except ValueError:
          return None
  
file_path: calamari/calamari_ocr/ocr/model/ctcdecoder/token_passing_ctc_decoder.py
imports: import math
  import numpy
  from calamari_ocr.ocr.model.ctcdecoder.ctc_decoder import CTCDecoder
label_desc: Use image node_id 2 for calling a global function with example usage: wordToLabelSeq(w, classes) and returns: res, None