code: def init_k2_rnnt(**kwargs):
      from nemo.collections.asr.parts.k2.ml_loss import RnntLoss
  
      rnnt = RnntLoss(**kwargs)
      return lambda acts, labels, lengths, label_lengths: rnnt(
          torch.nn.functional.log_softmax(acts, -1),
          labels.to(dtype=torch.long),
          lengths.to(dtype=torch.long),
          label_lengths.to(dtype=torch.long),
      )[0]
  
file_path: NeMo/tests/collections/asr/k2/test_rnnt.py
imports: import numpy
  import pytest
  import torch
  from nemo.collections.asr.parts.numba.rnnt_loss.rnnt_numpy import RNNTLoss
label_desc: Use image node_id 2 for calling a global function with example usage: init_k2_rnnt() and returns: function