code: def test_case_small_blank_last(
      self, device, k2_is_appropriate, k2_cuda_is_enabled
  ):
      skip_test_if_unsupported(
          device, k2_is_appropriate, k2_cuda_is_enabled
      )
  
      acts = np.array(
          [
              [
                  [
                      [0.0, 1.0, 3.0],
                      [0.0, 2.0, 3.0],
                      [1.0, 1.0, 3.0],
                      [2.0, 3.0, 2.0],
                  ],
                  [
                      [0.0, 0.0, 1.0],
                      [0.0, 1.0, 1.0],
                      [1.0, 0.0, 1.0],
                      [2.0, 2.0, 0.0],
                  ],
                  [
                      [0.0, 2.0, 5.0],
                      [0.0, 3.0, 5.0],
                      [1.0, 2.0, 5.0],
                      [2.0, 4.0, 4.0],
                  ],
                  [
                      [0.0, 3.0, 4.0],
                      [0.0, 4.0, 4.0],
                      [1.0, 3.0, 4.0],
                      [2.0, 5.0, 3.0],
                  ],
                  [
                      [2.0, 2.0, 1.0],
                      [2.0, 3.0, 1.0],
                      [3.0, 2.0, 1.0],
                      [4.0, 4.0, 0.0],
                  ],
              ]
          ]
      )
      labels = [[0, 1, 0]]
  
      fn_k2 = init_k2_rnnt(
          num_classes=acts.shape[-1],
          blank=acts.shape[-1] - 1,
          reduction="sum",
      )
      k2_cost, k2_grads = wrap_and_call(fn_k2, acts, labels, device)
  
      expected_cost = 6.789285182952881
      expected_grads = np.array(
          [
              [
                  [
                      [
                          -0.03551076725125313,
                          0.11419519782066345,
                          -0.07868456840515137,
                      ],
                      [
                          0.0027224558871239424,
                          0.00704305712133646,
                          -0.009765520691871643,
                      ],
                      [
                          0.0013856772566214204,
                          0.0013924005907028913,
                          -0.0027780719101428986,
                      ],
                      [
                          1.4249643527364242e-06,
                          3.873454716085689e-06,
                          -5.298420546751004e-06,
                      ],
                  ],
                  [
                      [
                          -0.1934257447719574,
                          0.19551163911819458,
                          -0.0020859241485595703,
                      ],
                      [
                          0.07043898105621338,
                          0.05738453567028046,
                          -0.12782356142997742,
                      ],
                      [
                          0.061031512916088104,
                          0.02286236733198166,
                          -0.08389391005039215,
                      ],
                      [
                          0.0005252412520349026,
                          0.0005252412520349026,
                          -0.0010504829697310925,
                      ],
                  ],
                  [
                      [
                          -0.007841046899557114,
                          0.025142310187220573,
                          -0.017301201820373535,
                      ],
                      [
                          0.0019501042552292347,
                          0.0005148053169250488,
                          -0.0024650096893310547,
                      ],
                      [
                          0.0027856370434165,
                          0.008609085343778133,
                          -0.01139475405216217,
                      ],
                      [
                          9.526080975774676e-05,
                          0.0007038871408440173,
                          -0.000799147819634527,
                      ],
                  ],
                  [
                      [
                          -0.01533521432429552,
                          0.1386115401983261,
                          -0.12327653169631958,
                      ],
                      [
                          0.002850571647286415,
                          -0.006693005561828613,
                          0.003842458128929138,
                      ],
                      [
                          0.009236274287104607,
                          0.08995233476161957,
                          -0.0991886705160141,
                      ],
                      [
                          0.0001865450612967834,
                          0.0037468576338142157,
                          -0.003933403175324202,
                      ],
                  ],
                  [
                      [
                          -0.2888762652873993,
                          0.211185485124588,
                          0.07769080251455307,
                      ],
                      [
                          0.15952755510807037,
                          -0.2182144820690155,
                          0.05868690833449364,
                      ],
                      [
                          -0.3332723379135132,
                          0.2436419129371643,
                          0.0896308496594429,
                      ],
                      [
                          0.4954628646373749,
                          0.4954628646373749,
                          -0.9909257292747498,
                      ],
                  ],
              ]
          ]
      )
  
      assert np.allclose(
          k2_cost, expected_cost, rtol=1e-6
      ), "small_test_blank_last costs mismatch."
      assert np.allclose(
          k2_grads, expected_grads, atol=1e-6
      ), "small_test_blank_last gradient mismatch."
  
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 the TestRNNTLossK2 obj's underlying member method code with example usage: obj.test_case_small_blank_last(device, k2_is_appropriate, k2_cuda_is_enabled) without return types