code: def init_k2_ctc(**kwargs):
      from nemo.collections.asr.parts.k2.ml_loss import CtcLoss
  
      ctc = CtcLoss(**kwargs)
      return lambda log_probs, labels, lengths, label_lengths: ctc(
          log_probs.transpose(0, 1), labels, lengths, label_lengths
      )[0]
  
file_path: NeMo/tests/collections/asr/k2/test_ctc.py
imports: import numpy
  import pytest
  import torch
  from torch.nn import CTCLoss
label_desc: Use image node_id 2 for calling a global function with example usage: init_k2_ctc() and returns: function