code: def test_case_big_tensor(
      self, device, k2_is_appropriate, k2_cuda_is_enabled
  ):
      skip_test_if_unsupported(
          device, k2_is_appropriate, k2_cuda_is_enabled
      )
  
      # minibatch x T x alphabet_size
      acts = [
          [
              [
                  0.06535690384862791,
                  0.7875301411923206,
                  0.08159176605666074,
              ],
              [
                  0.5297155426466327,
                  0.7506749639230854,
                  0.7541348379087998,
              ],
              [
                  0.6097641124736383,
                  0.8681404965673826,
                  0.6225318186056529,
              ],
              [
                  0.6685222872103057,
                  0.8580392805336061,
                  0.16453892311765583,
              ],
              [
                  0.989779515236694,
                  0.944298460961015,
                  0.6031678586829663,
              ],
              [
                  0.9467833543605416,
                  0.666202507295747,
                  0.28688179752461884,
              ],
              [
                  0.09418426230195986,
                  0.3666735970751962,
                  0.736168049462793,
              ],
              [
                  0.1666804425271342,
                  0.7141542198635192,
                  0.3993997272216727,
              ],
              [
                  0.5359823524146038,
                  0.29182076440286386,
                  0.6126422611507932,
              ],
              [
                  0.3242405528768486,
                  0.8007644367291621,
                  0.5241057606558068,
              ],
              [
                  0.779194617063042,
                  0.18331417220174862,
                  0.113745182072432,
              ],
              [
                  0.24022162381327106,
                  0.3394695622533106,
                  0.1341595066017014,
              ],
          ],
          [
              [
                  0.5055615569388828,
                  0.051597282072282646,
                  0.6402903936686337,
              ],
              [
                  0.43073311517251,
                  0.8294731834714112,
                  0.1774668847323424,
              ],
              [
                  0.3207001991262245,
                  0.04288308912457006,
                  0.30280282975568984,
              ],
              [
                  0.6751777088333762,
                  0.569537369330242,
                  0.5584738347504452,
              ],
              [
                  0.08313242153985256,
                  0.06016544344162322,
                  0.10795752845152584,
              ],
              [
                  0.7486153608562472,
                  0.943918041459349,
                  0.4863558118797222,
              ],
              [
                  0.4181986264486809,
                  0.6524078485043804,
                  0.024242983423721887,
              ],
              [
                  0.13458171554507403,
                  0.3663418070512402,
                  0.2958297395361563,
              ],
              [
                  0.9236695822497084,
                  0.6899291482654177,
                  0.7418981733448822,
              ],
              [
                  0.25000547599982104,
                  0.6034295486281007,
                  0.9872887878887768,
              ],
              [
                  0.5926057265215715,
                  0.8846724004467684,
                  0.5434495396894328,
              ],
              [
                  0.6607698886038497,
                  0.3771277082495921,
                  0.3580209022231813,
              ],
          ],
      ]
  
      expected_costs = [6.388067, 5.2999153]
      expected_grads = [
          [
              [0.06130501, -0.3107036, 0.24939862],
              [0.08428053, -0.07131141, -0.01296911],
              [-0.04510102, 0.21943177, -0.17433074],
              [-0.1970142, 0.37144178, -0.17442757],
              [-0.08807078, 0.35828218, -0.2702114],
              [-0.24209887, 0.33242193, -0.09032306],
              [-0.07871056, 0.3116736, -0.23296304],
              [-0.27552277, 0.43320477, -0.157682],
              [-0.16173504, 0.27361175, -0.1118767],
              [-0.13012655, 0.42030025, -0.2901737],
              [-0.2378576, 0.26685005, -0.02899244],
              [0.08487711, 0.36765888, -0.45253596],
          ],
          [
              [-0.14147596, -0.2702151, 0.41169107],
              [-0.05323913, -0.18442528, 0.23766442],
              [-0.24160458, -0.11692462, 0.3585292],
              [-0.1004294, -0.17919227, 0.27962166],
              [-0.01819841, -0.12625945, 0.14445786],
              [-0.00131121, 0.06060241, -0.0592912],
              [-0.09093696, 0.2536721, -0.16273515],
              [-0.08962183, 0.34198248, -0.25236064],
              [-0.19668606, 0.25176668, -0.05508063],
              [0.0232805, 0.1351273, -0.1584078],
              [0.09494846, -0.17026341, 0.07531495],
              [0.00775955, -0.30424336, 0.29648378],
          ],
      ]
  
      acts = np.array(acts)
      expected_costs = np.array(expected_costs)
      labels = [[1, 2, 2, 2, 2], [1, 1, 2, 2, 1]]
  
      fn_k2 = init_k2_ctc(
          num_classes=acts.shape[-1], blank=0, reduction="none"
      )
      k2_costs, k2_grads = wrap_and_call(fn_k2, acts, labels, device)
  
      assert np.allclose(
          k2_costs, expected_costs
      ), "big_test average costs mismatch."
      assert np.allclose(
          k2_grads, expected_grads, rtol=1e-3
      ), "big_test grads for average cost mismatch."
  
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 4 for calling the TestCTCLossK2 obj's underlying member method code with example usage: obj.test_case_big_tensor(device, k2_is_appropriate, k2_cuda_is_enabled) without return types