code: def add_wav2vec_asr_args(parser):
      parser.add_argument(
          "--w2v-path", help="path to wav2vec 2.0 model"
      )
      parser.add_argument(
          "--no-pretrained-weights",
          action="store_true",
          help="if true, does not load pretrained weights",
      )
      parser.add_argument(
          "--dropout-input",
          type=float,
          metavar="D",
          help="dropout to apply to the input (after feat extr)",
      )
      parser.add_argument(
          "--final-dropout",
          type=float,
          metavar="D",
          help="dropout after transformer and before final projection",
      )
      parser.add_argument(
          "--apply-mask",
          action="store_true",
          help="apply masking during fine-tuning",
      )
      parser.add_argument(
          "--dropout",
          type=float,
          metavar="D",
          help="dropout probability inside wav2vec 2.0 model",
      )
      parser.add_argument(
          "--attention-dropout",
          type=float,
          metavar="D",
          help="dropout probability for attention weights inside wav2vec 2.0 model",
      )
      parser.add_argument(
          "--activation-dropout",
          "--relu-dropout",
          type=float,
          metavar="D",
          help="dropout probability after activation in FFN inside wav2vec 2.0 model",
      )
      parser.add_argument(
          "--mask-length",
          type=int,
          help="repeat the mask indices multiple times",
      )
      parser.add_argument(
          "--mask-prob",
          type=float,
          help="probability of replacing a token with mask",
      )
      parser.add_argument(
          "--mask-selection",
          type=str,
          choices=["static", "uniform", "normal", "poisson"],
          help="how to choose masks",
      )
      parser.add_argument(
          "--mask-other",
          type=float,
          help="stdev of the mask length in case of 'normal' selection strategy",
      )
      parser.add_argument(
          "--no-mask-overlap",
          action="store_true",
          help="whether to allow masks to overlap",
      )
      parser.add_argument(
          "--mask-channel-length",
          type=int,
          help="repeat the mask indices multiple times",
      )
      parser.add_argument(
          "--mask-channel-prob",
          type=float,
          help="probability of replacing a token with mask",
      )
      parser.add_argument(
          "--mask-channel-selection",
          type=str,
          choices=["static", "uniform", "normal", "poisson"],
          help="how to choose masks",
      )
      parser.add_argument(
          "--mask-channel-other",
          type=float,
          help="stdev of the mask length in case of 'normal' selection strategy",
      )
      parser.add_argument(
          "--no-mask-channel-overlap",
          action="store_true",
          help="whether to allow masks to overlap",
      )
      parser.add_argument(
          "--freeze-finetune-updates",
          type=int,
          metavar="N",
          help="dont finetune wav2vec for this many updates",
      )
      parser.add_argument(
          "--feature-grad-mult",
          type=float,
          metavar="D",
          help="reset feature grad mult in wav2vec 2.0 to this",
      )
      parser.add_argument(
          "--layerdrop",
          type=float,
          metavar="D",
          help="probability of dropping a layer in wav2vec 2.0",
      )
      parser.add_argument(
          "--max-positions",
          type=int,
          metavar="N",
          help="Max input positions to be used in the conformer encoder in wav2vec 2.0",
      )
      parser.add_argument("--encoder-proj", action="store_true")
      parser.add_argument("--w2v-args", default=None)
      parser.add_argument(
          "--remove-weight-norm",
          action="store_true",
          help="if set, then the weight-norm (in one pos_conv layer) is removed from the model",
      )
      parser.add_argument(
          "--encoder-embed-dim",
          type=int,
          metavar="N",
          help="encoder embedding dimension to be used when w2v_path is None and no encoder_proj is set",
      )
  
imports: import copy
  import logging
  from typing import Dict, List, Optional, Tuple
  import numpy
  import torch
  import torch.nn
  from torch import Tensor
  from fairseq import checkpoint_utils, utils
  from fairseq.data.data_utils import lengths_to_padding_mask
  from fairseq.models import FairseqEncoder, FairseqEncoderDecoderModel, FairseqEncoderModel, FairseqLanguageModel, register_model, register_model_architecture
  from fairseq.models.speech_to_speech.modules.ctc_decoder import CTCDecoder
  from fairseq.models.speech_to_text.hub_interface import S2THubInterface
  from fairseq.models.transformer import Embedding, TransformerDecoder, TransformerModelBase
  from fairseq.models.wav2vec import Wav2VecEncoder
  from fairseq.modules.layer_norm import LayerNorm
label_desc: Use image node_id 2 for calling a global function with example usage: add_wav2vec_asr_args(parser) without return types