class_docstr: MMI loss with custom CTC topologies.
  Available topologies:
      -   `default`, with or without self-loops
      -   `compact`, with or without self-loops
      -   `shared_blank`, with or without self-loops
      -   `minimal`, without self-loops
  
  cfg takes precedence over all optional parameters
  We keep explicit parameter setting to be able to create an instance without the need of a config.
code: def __init__(
      self,
      num_classes: int,
      blank: int,
      reduction: str,
      cfg: Optional[DictConfig] = None,
      topo_type: str = "default",
      topo_with_self_loops: bool = True,
      token_lm: Optional[Union["k2.Fsa", str]] = None,
      intersect_pruned: bool = False,
      intersect_conf: GraphIntersectDenseConfig = GraphIntersectDenseConfig(),
      boost_coeff: float = 0.0,
  ):
      super().__init__(
          num_classes=num_classes,
          blank=blank,
          reduction=reduction,
          cfg=cfg,
          topo_type=topo_type,
          topo_with_self_loops=topo_with_self_loops,
          token_lm=token_lm,
          intersect_pruned=intersect_pruned,
          intersect_conf=intersect_conf,
          boost_coeff=boost_coeff,
      )
  
imports: from abc import abstractmethod
  from typing import Any, Optional, Tuple, Union
  import torch
  from omegaconf import DictConfig
  from nemo.collections.asr.parts.k2.classes import GraphIntersectDenseConfig
  from nemo.collections.asr.parts.k2.loss_mixins import CtcK2Mixin
  from nemo.collections.asr.parts.k2.ml_loss import MLLoss
  from nemo.collections.asr.parts.k2.utils import create_sparse_wrapped, get_tot_objf_and_finite_mask, invert_permutation, load_graph
  from nemo.core.utils.k2_guard import k2
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new CtcMmiLoss object from inherited base classes: MAPLoss, CtcK2Mixin with example: obj = CtcMmiLoss(num_classes, blank, reduction, cfg, topo_type, topo_with__loops, token_lm, intersect_pruned, intersect_conf, boost_coeff)