class_docstr: Regular CTC loss with custom 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,
  ):
      super().__init__(
          num_classes=num_classes,
          blank=blank,
          reduction=reduction,
          cfg=cfg,
          topo_type=topo_type,
          topo_with_self_loops=topo_with_self_loops,
      )
      self.graph_compiler = CtcTopologyCompiler(
          self.num_classes,
          self.blank,
          self.topo_type,
          self.topo_with_self_loops,
      )
  
imports: from abc import abstractmethod
  from typing import Any, Optional, Tuple
  import torch
  from omegaconf import DictConfig
  from nemo.collections.asr.parts.k2.graph_compilers import CtcTopologyCompiler, RnntTopologyCompiler
  from nemo.collections.asr.parts.k2.loss_mixins import CtcK2Mixin, RnntK2Mixin
  from nemo.collections.asr.parts.k2.utils import get_tot_objf_and_finite_mask, invert_permutation
  from nemo.core.utils.k2_guard import k2
label_desc: Use image node_id 1 to create a new CtcLoss object from inherited base classes: MLLoss, CtcK2Mixin with example: obj = CtcLoss(num_classes, blank, reduction, cfg, topo_type, topo_with__loops)