class_docstr: Coalesces frames along time dimension into a
  fewer number of frames with higher feature dimensionality.
  
  Args:
      stride (int): number of frames to merge for each output frame.
class_docstr_tok: ["Coalesces","frames","along","time","dimension","into","a","fewer","number","of","frames","with","higher","feature","dimensionality",".","Args",":","stride","(","int",")",":","number","of","frames","to","merge","for","each","output","frame","."]
docstr: Forward pass.
  
  B: batch size;
  T: maximum input sequence length in batch;
  D: feature dimension of each input sequence frame.
  
  Args:
      input (torch.Tensor): input sequences, with shape `(B, T, D)`.
      lengths (torch.Tensor): with shape `(B,)` and i-th element representing
          number of valid frames for i-th batch element in ``input``.
  
  Returns:
      (torch.Tensor, torch.Tensor):
          torch.Tensor
              output sequences, with shape
              `(B, T  // stride, D * stride)`
          torch.Tensor
              output lengths, with shape `(B,)` and i-th element representing
              number of valid frames for i-th batch element in output sequences.
docstr_tok: ["Forward","pass",".","B",":","batch","size",";","T",":","maximum","input","sequence","length","in","batch",";","D",":","feature","dimension","of","each","input","sequence","frame",".","Args",":","input","(","torch.Tensor",")",":","input","sequences",",","with","shape","`","(","B",",","T",",","D",")","`",".","lengths","(","torch.Tensor",")",":","with","shape","`","(","B",",",")","`","and","i-th","element","representing","number","of","valid","frames","for","i-th","batch","element","in","``","input","``",".","Returns",":","(","torch.Tensor",",","torch.Tensor",")",":","torch.Tensor","output","sequences",",","with","shape","`","(","B",",","T","\/\/","stride",",","D","*","stride",")","`","torch.Tensor","output","lengths",",","with","shape","`","(","B",",",")","`","and","i-th","element","representing","number","of","valid","frames","for","i-th","batch","element","in","output","sequences","."]
code: def forward(
      self, input: torch.Tensor, lengths: torch.Tensor
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      r"""Forward pass.
  
      B: batch size;
      T: maximum input sequence length in batch;
      D: feature dimension of each input sequence frame.
  
      Args:
          input (torch.Tensor): input sequences, with shape `(B, T, D)`.
          lengths (torch.Tensor): with shape `(B,)` and i-th element representing
              number of valid frames for i-th batch element in ``input``.
  
      Returns:
          (torch.Tensor, torch.Tensor):
              torch.Tensor
                  output sequences, with shape
                  `(B, T  // stride, D * stride)`
              torch.Tensor
                  output lengths, with shape `(B,)` and i-th element representing
                  number of valid frames for i-th batch element in output sequences.
      """
      B, T, D = input.shape
      num_frames = T - (T % self.stride)
      input = input[:, :num_frames, :]
      lengths = lengths.div(self.stride, rounding_mode="trunc")
      T_max = num_frames // self.stride
  
      output = input.reshape(B, T_max, D * self.stride)
      output = output.contiguous()
      return output, lengths
  
imports: from abc import ABC, abstractmethod
  from typing import List, Optional, Tuple
  import torch
  from torchaudio.models import Emformer
label_desc: Use image node_id 2 for calling the _TimeReduction obj's underlying member method code with example usage: obj.forward(input, lengths) and returns: output,  lengths