docstr: Check that method `infer` returns input `lengths` with right context length subtracted.
docstr_tok: ["Check","that","method","`","infer","`","returns","input","`","lengths","`","with","right","context","length","subtracted","."]
code: def test_output_lengths_infer(self):
      r"""Check that method `infer` returns input `lengths` with right context length subtracted."""
      input_dim = 88
      batch_size = 13
      num_frames = 6
      right_context_length = 2
  
      emformer = self.gen_model(input_dim, right_context_length).eval()
      input, lengths = self.gen_inputs(
          input_dim, batch_size, num_frames, right_context_length
      )
      _, output_lengths, _ = emformer.infer(input, lengths)
      self.assertEqual(
          torch.clamp(lengths - right_context_length, min=0),
          output_lengths,
      )
  
file_path: audio/test/torchaudio_unittest/models/emformer/emformer_test_impl.py
imports: from abc import ABC, abstractmethod
  import torch
  from torchaudio.models import Emformer
  from torchaudio_unittest.common_utils import TestBaseMixin, torch_script
label_desc: Use image node_id 9 for calling the EmformerTestMixin obj's underlying member method code with example usage: obj.test_output_lengths_infer() without return types