code: def test_torchscript_consistency(
      self, model, feature_dim, aux_num_out
  ):
      if aux_num_out is not None:
          model = model(aux_num_out=aux_num_out)
      else:
          model = model()
      model.eval()
  
      batch_size, num_frames = 3, 1024
      features = torch.randn(batch_size, num_frames, feature_dim)
      lengths = torch.randint(
          low=0,
          high=num_frames,
          size=[
              batch_size,
          ],
      )
  
      ref_out, ref_len = model(features, lengths)
  
      scripted = torch_script(model)
      hyp_out, hyp_len = scripted(features, lengths)
  
      self.assertEqual(hyp_out, ref_out)
      self.assertEqual(hyp_len, ref_len)
  
file_path: audio/test/torchaudio_unittest/prototype/ssl_model_test.py
imports: import torch
  from parameterized import parameterized
  from torchaudio.prototype.models import conformer_wav2vec2_base, conformer_wav2vec2_pretrain_base, emformer_hubert_base
  from torchaudio_unittest.common_utils import nested_params, skipIfNoCuda, torch_script, TorchaudioTestCase
label_desc: Use image node_id 6 for calling the TestSSLModel obj's underlying member method code with example usage: obj.test_torchscript_consistency(model, feature_dim, aux_num_out) without return types