class_docstr: Unsupervised ASR model.
  
  The source code is from FAIRSEQ:
  https://github.com/facebookresearch/fairseq/tree/main/examples/wav2vec/unsupervised
code: def _extract_feats(
      self, speech: torch.Tensor, speech_lengths: torch.Tensor
  ) -> Tuple[torch.Tensor, torch.Tensor]:
      assert speech_lengths.dim() == 1, speech_lengths.shape
  
      # for data-parallel
      speech = speech[:, : speech_lengths.max()]
  
      if (
          self.frontend is not None
          and not self.use_collected_training_feats
      ):
          # Frontend
          #  e.g. STFT and Feature extract
          #       data_loader may send time-domain signal in this case
          # speech (Batch, NSamples) -> feats: (Batch, NFrames, Dim)
          speech = F.layer_norm(speech, speech.shape)
          feats, feats_lengths = self.frontend(speech, speech_lengths)
      else:
          # No frontend and no feature extract (usually with pre-extracted feat)
          # logging.info("use exisitng features")
          feats, feats_lengths = speech, speech_lengths
      return feats, feats_lengths
  
imports: import argparse
  import logging
  from contextlib import contextmanager
  from typing import Dict, Optional, Tuple
  import editdistance
  import torch
  import torch.nn.functional
  from packaging.version import parse
  from typeguard import check_argument_types
  from espnet2.asr.frontend.abs_frontend import AbsFrontend
  from espnet2.text.token_id_converter import TokenIDConverter
  from espnet2.torch_utils.device_funcs import force_gatherable
  from espnet2.train.abs_espnet_model import AbsESPnetModel
  from espnet2.uasr.discriminator.abs_discriminator import AbsDiscriminator
  from espnet2.uasr.generator.abs_generator import AbsGenerator
  from espnet2.uasr.loss.abs_loss import AbsUASRLoss
  from espnet2.uasr.segmenter.abs_segmenter import AbsSegmenter
  from espnet2.utils.types import str2bool
  from espnet.nets.pytorch_backend.nets_utils import make_pad_mask
label_desc: Use image node_id 7 for calling the ESPnetUASRModel obj's underlying member method code with example usage: obj._extract_feats(speech, speech_lengths) and returns: feats,  feats_lengths