class_docstr: Regular CTC graph decoder 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
  
  Can do decoding and forced alignment.
code: def __init__(
      self,
      num_classes: int,
      blank: int,
      cfg: Optional[DictConfig] = None,
      intersect_pruned: bool = False,
      intersect_conf: GraphIntersectDenseConfig = GraphIntersectDenseConfig(),
      topo_type: str = "default",
      topo_with_self_loops: bool = True,
      device: torch.device = torch.device("cpu"),
  ):
      super().__init__(
          num_classes,
          blank,
          cfg,
          intersect_pruned,
          intersect_conf,
          topo_type,
          topo_with_self_loops,
          device,
      )
      from nemo.collections.asr.parts.k2.graph_compilers import (
          CtcTopologyCompiler,
      )
  
      self.graph_compiler = CtcTopologyCompiler(
          self.num_classes,
          self.blank,
          self.topo_type,
          self.topo_with_self_loops,
          self.device,
      )
      self.base_graph = k2.create_fsa_vec(
          [self.graph_compiler.ctc_topo_inv.invert()]
      ).to(self.device)
  
imports: from abc import abstractmethod
  from typing import List, 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, RnntK2Mixin
  from nemo.collections.asr.parts.k2.utils import invert_permutation, load_graph
  from nemo.utils import logging
label_desc: Use image node_id 1 to create a new CtcDecoder object from inherited base classes: BaseDecoder, CtcK2Mixin with example: obj = CtcDecoder(num_classes, blank, cfg, intersect_pruned, intersect_conf, topo_type, topo_with__loops, device)