code: def test_forward(self):
      asr_model = ASRModel.from_pretrained(
          "stt_en_fastconformer_ctc_large"
      )
      asr_model = asr_model.eval()
      asr_model.preprocessor.featurizer.dither = 0.0
      asr_model.preprocessor.featurizer.pad_to = 0
  
      len = 512
  
      input_signal_batch1 = torch.randn(
          size=(1, len), device=asr_model.device
      )
      length_batch1 = torch.randint(
          low=161, high=500, size=[1], device=asr_model.device
      )
  
      input_signal_batch4 = torch.randn(
          size=(4, len), device=asr_model.device
      )
      length_batch4 = torch.randint(
          low=161, high=500, size=[4], device=asr_model.device
      )
  
      with torch.no_grad():
          # regular inference
          logprobs_batch1_nosplit, _, _ = asr_model.forward(
              input_signal=input_signal_batch1,
              input_signal_length=length_batch1,
          )
          logprobs_batch4_nosplit, _, _ = asr_model.forward(
              input_signal=input_signal_batch4,
              input_signal_length=length_batch4,
          )
  
          # force chunking to 2
          asr_model.change_subsampling_conv_chunking_factor(
              subsampling_conv_chunking_factor=2
          )
  
          # chunked inference by channels as batch is 1
          logprobs_batch1_split, _, _ = asr_model.forward(
              input_signal=input_signal_batch1,
              input_signal_length=length_batch1,
          )
          # chunked inference by batch as it is 4 [> 1]
          logprobs_batch4_split, _, _ = asr_model.forward(
              input_signal=input_signal_batch4,
              input_signal_length=length_batch4,
          )
  
      diff = torch.mean(
          torch.abs(logprobs_batch1_split - logprobs_batch1_nosplit)
      )
      assert diff <= 1e-6
      diff = torch.max(
          torch.abs(logprobs_batch4_split - logprobs_batch4_nosplit)
      )
      assert diff <= 1e-6
  
imports: import pytest
  import torch
  from nemo.collections.asr.models import ASRModel
label_desc: Use image node_id 1 for calling the TestASRSubsamplingConvChunking obj's underlying member method code with example usage: obj.test_forward() without return types