class_docstr: Conformer Encoder class, consisting of feature projection and conformer modules.
  
  Args:
      feature_projection (nn.Module):
          Projects feature to encoder dimension.
      conformer (nn.ModuleList)
          List of Conformer layers.
docstr: Returns the list of outputs from the intermediate layers of conformer block in the encoder.
  
  Args:
      features (Tensor): Tensor of features of shape ``(B, T, D)``.
      lengths (Tensor or None, optional): Valid length of each input sample. shape: ``(B, )``.
  
  Returns:
      List[Tensor]:
          Features from requested layers. Each Tensor is of shape: `(batch, time frame, feature dimension)`.
docstr_tok: ["Returns","the","list","of","outputs","from","the","intermediate","layers","of","conformer","block","in","the","encoder",".","Args",":","features","(","Tensor",")",":","Tensor","of","features","of","shape","``","(","B",",","T",",","D",")","``",".","lengths","(","Tensor","or","None",",","optional",")",":","Valid","length","of","each","input","sample",".","shape",":","``","(","B",",",")","``",".","Returns",":","List","[","Tensor","]",":","Features","from","requested","layers",".","Each","Tensor","is","of","shape",":","`","(","batch",",","time","frame",",","feature","dimension",")","`","."]
code: def extract_features(
      self,
      features: Tensor,
      lengths: Optional[Tensor] = None,
      num_layers: Optional[int] = None,
  ) -> List[Tensor]:
      """Returns the list of outputs from the intermediate layers of conformer block in the encoder.
  
      Args:
          features (Tensor): Tensor of features of shape ``(B, T, D)``.
          lengths (Tensor or None, optional): Valid length of each input sample. shape: ``(B, )``.
  
      Returns:
          List[Tensor]:
              Features from requested layers. Each Tensor is of shape: `(batch, time frame, feature dimension)`.
      """
      x, masks = self._preprocess(features, lengths)
      return self._get_intermediate_outputs(
          x, mask=masks, num_layers=num_layers
      )
  
imports: from typing import List, Optional, Tuple, Union
  import torch
  from torch import nn, Tensor
  from torch.nn import Module, ModuleList
  from torchaudio.models import Wav2Vec2Model
  from torchaudio.models.conformer import ConformerLayer
  from torchaudio.models.rnnt import _TimeReduction
  from torchaudio.models.wav2vec2 import components
label_desc: Use image node_id 5 for calling the ConformerEncoder obj's underlying member method code with example usage: obj.extract_features(features, lengths, num_layers) and returns: self