code: def ctc_beam_search_decoder(probs_seq,
                              alphabet,
                              beam_size,
                              cutoff_prob=1.0,
                              cutoff_top_n=40,
                              scorer=None):
      
      beam_results = swigwrapper.ctc_beam_search_decoder(
          probs_seq, alphabet.config_file(), beam_size, cutoff_prob, cutoff_top_n,
          scorer)
      beam_results = [(res.probability, alphabet.decode(res.tokens)) for res in beam_results]
      return beam_results
docs: Wrapper for the CTC Beam Search Decoder.
  
      :param probs_seq: 2-D list of probability distributions over each time
                        step, with each element being a list of normalized
                        probabilities over alphabet and blank.
      :type probs_seq: 2-D list
      :param alphabet: alphabet list.
      :alphabet: Alphabet
      :param beam_size: Width for beam search.
      :type beam_size: int
      :param cutoff_prob: Cutoff probability in pruning,
                          default 1.0, no pruning.
      :type cutoff_prob: float
      :param cutoff_top_n: Cutoff number in pruning, only top cutoff_top_n
                           characters with highest probs in alphabet will be
                           used in beam search, default 40.
      :type cutoff_top_n: int
      :param scorer: External scorer for partially decoded sentence, e.g. word
                     count or language model.
      :type scorer: Scorer
      :return: List of tuples of log probability and sentence as decoding
               results, in descending order of the probability.
      :rtype: list