class_docstr: Builder class for RNNT Emission Adapters.
  
  An Emission Adapter is an FSA used to emulate desired temporal Emissions FSA properties of a trivial Emissions FSA.
  Temporal properties are emulated by <epsilon>-arcs with zero log-weight.
  These additional arcs do not contribute to the lattice scores and can be easily removed from the best path.
  
  k2 does not have Emissions FSAs. Instead, it has DenseFsaVec, which is not a real FSA.
  Thus, Emission Adapters should be composed with Supervision FSAs.
  IMPOTRANT: <epsilon>-outputs are expected to be present in the DenseFsaVec.
  
  These RNNT adapters do only the <blank> re-routing (emulate <blank> hopping over U dimension).
  Redundant non-<blank> are not removed by these adapters.
  
  At initialization, the builder expects a list of tokens, <blank> number and <epsilon> number.
  When called, the builder returns adapters according to the provided text lengths.
class_docstr_tok: ["Builder","class","for","RNNT","Emission","Adapters",".","An","Emission","Adapter","is","an","FSA","used","to","emulate","desired","temporal","Emissions","FSA","properties","of","a","trivial","Emissions","FSA",".","Temporal","properties","are","emulated","by","<","epsilon",">","-arcs","with","zero","log-weight",".","These","additional","arcs","do","not","contribute","to","the","lattice","scores","and","can","be","easily","removed","from","the","best","path",".","k2","does","not","have","Emissions","FSAs",".","Instead",",","it","has","DenseFsaVec",",","which","is","not","a","real","FSA",".","Thus",",","Emission","Adapters","should","be","composed","with","Supervision","FSAs",".","IMPOTRANT",":","<","epsilon",">","-outputs","are","expected","to","be","present","in","the","DenseFsaVec",".","These","RNNT","adapters","do","only","the","<","blank",">","re-routing","(","emulate","<","blank",">","hopping","over","U","dimension",")",".","Redundant","non-","<","blank",">","are","not","removed","by","these","adapters",".","At","initialization",",","the","builder","expects","a","list","of","tokens",",","<","blank",">","number","and","<","epsilon",">","number",".","When","called",",","the","builder","returns","adapters","according","to","the","provided","text","lengths","."]
code: def __init__(
      self,
      tokens: List[int],
      blank_num: int,
      eps_num: Optional[int] = None,
  ):
      assert (
          -1 not in tokens
      ), "We assume -1 is ID of the final transition"
      assert blank_num in tokens, "The blank ID must be in tokens"
      assert (
          eps_num is None or eps_num not in tokens
      ), "The epsion ID must not be in tokens"
  
      self.tokens = tokens
      self.blank_num = blank_num
      self.eps_num = self.tokens[-1] + 1 if eps_num is None else eps_num
  
file_path: NeMo/nemo/collections/asr/parts/k2/topologies.py
imports: from functools import lru_cache
  from typing import List, Optional, Union
  import torch
  from nemo.core.utils.k2_guard import k2
label_desc: Use image node_id 1 to create a new RnntEmissionAdapterBuilder object from inherited base classes: object with example: obj = RnntEmissionAdapterBuilder(tokens, blank_num, eps_num)