class_docstr: Base class for graph transducer losses.
  Implementation of the approach described in "Powerful and Extensible WFST Framework for RNN-Transducer Losses"
  https://ieeexplore.ieee.org/document/10096679
  
  Compose-Transducer: compose the unit (target text) and temporal schemas (graphs) into lattice.
      Subclass should implement `get_unit_schema` and `get_temporal_schema` methods.
  Grid-Transducer: construct the RNN-T lattice (grid) directly in code.
      Subclass should implement `get_grid` method.
docstr: Get unit schema (target text) graph for Compose-Transducer.
  
  Args:
      units_tensor: tensor with target text
      vocab_size: number of labels (including blank). Needed to construct additional eps-arcs (in some cases).
  
  Returns:
      unit schema graph (k2.Fsa).
      Labels: <unit>:<unit>:<unit_position> (k2.Fsa: labels, aux_labels, unit_positions)
docstr_tok: ["Get","unit","schema","(","target","text",")","graph","for","Compose-Transducer",".","Args",":","units_tensor",":","tensor","with","target","text","vocab_size",":","number","of","labels","(","including","blank",")",".","Needed","to","construct","additional","eps-arcs","(","in","some","cases",")",".","Returns",":","unit","schema","graph","(","k2.Fsa",")",".","Labels",":","<","unit",">",":","<","unit",">",":","<","unit_position",">","(","k2.Fsa",":","labels",",","aux_labels",",","unit_positions",")"]
code: def get_unit_schema(
      self, units_tensor: torch.Tensor, vocab_size: int
  ) -> "k2.Fsa":
      """
      Get unit schema (target text) graph for Compose-Transducer.
  
      Args:
          units_tensor: tensor with target text
          vocab_size: number of labels (including blank). Needed to construct additional eps-arcs (in some cases).
  
      Returns:
          unit schema graph (k2.Fsa).
          Labels: <unit>:<unit>:<unit_position> (k2.Fsa: labels, aux_labels, unit_positions)
      """
      pass
  
imports: import abc
  from contextlib import nullcontext
  from typing import ContextManager
  import torch
  import torch.nn.functional
  from nemo.core.classes.loss import Loss
  from nemo.core.utils.k2_guard import k2
label_desc: Use image node_id 2 for calling the GraphTransducerLossBase obj's underlying member method code with example usage: obj.get_unit_schema(units_tensor, vocab_size) without return types