class_docstr: A beam CTC decoder.
  
  Provides a common abstraction for sample level beam decoding.
  
  Args:
      blank_id: int, index of the blank token. Can be 0 or len(vocabulary).
      beam_size: int, size of the beam used in the underlying beam search engine.
class_docstr_tok: ["A","beam","CTC","decoder",".","Provides","a","common","abstraction","for","sample","level","beam","decoding",".","Args",":","blank_id",":","int",",","index","of","the","blank","token",".","Can","be","0","or","len","(","vocabulary",")",".","beam_size",":","int",",","size","of","the","beam","used","in","the","underlying","beam","search","engine","."]
code: def __init__(self, blank_id: int, beam_size: int):
      self.blank_id = blank_id
  
      if beam_size < 1:
          raise ValueError("Beam search size cannot be less than 1!")
  
      self.beam_size = beam_size
  
      # Variables set by corresponding setter methods
      self.vocab = None
      self.decoding_type = None
      self.tokenizer = None
  
      # Utility maps for vocabulary
      self.vocab_index_map = None
      self.index_vocab_map = None
  
      # Internal variable, used to prevent double reduction of consecutive tokens (ctc collapse)
      self.override_fold_consecutive_value = None
  
imports: import math
  import os
  from dataclasses import dataclass, field
  from typing import List, Optional, Tuple, Union
  import torch
  from nemo.collections.asr.parts.utils import rnnt_utils
  from nemo.collections.common.tokenizers.tokenizer_spec import TokenizerSpec
  from nemo.core.classes import Typing, typecheck
  from nemo.core.neural_types import HypothesisType, LengthsType, LogprobsType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 3 to create a new AbstractBeamCTCInfer object from inherited base classes: Typing with example: obj = AbstractBeamCTCInfer(blank_id, beam_size)