class_docstr: Maximum a Posteriori Probability criterion.
  It implements Lattice-Free Maximum Mutual Information (LF-MMI) and LF-boosted-MMI (LF-bMMI) losses.
  
  Based on https://github.com/k2-fsa/snowfall/blob/master/snowfall/objectives/mmi.py
  
  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 update_graph(self, graph: "k2.Fsa"):
      # expected to be set in child classes
      raise NotImplementedError
  
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 2 for calling the MAPLoss obj's underlying member method code with example usage: obj.update_graph(graph) without return types