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 __call__(
      self, adapter_lengths: Union[torch.Tensor, List[int]]
  ) -> "k2.Fsa":
      # if you don't make adapter_lengths a list beforehand,
      # "i" will be implicitly converted to int, and this will always be considered a cache miss
      return k2.create_fsa_vec(
          [
              self._build_single_adapter(i)
              for i in adapter_lengths.tolist()
          ]
      )
  
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 2 for calling the RnntEmissionAdapterBuilder obj's underlying member method code with example usage: obj.__call__(adapter_lengths) and returns: k2