code: def speech_text_pretrain_bart_base(args):
      # speech masking
      args.dropout_input = getattr(args, "dropout_input", 0)
      args.dropout_features = getattr(args, "dropout_features", 0)
      args.speech_mask_length = getattr(args, "speech_mask_length", 10)
      args.speech_mask_prob = getattr(args, "speech_mask_prob", 0.65)
      args.speech_sup_mask_prob = getattr(
          args, "speech_sup_mask_prob", 0.3
      )
      args.speech_unsup_mask_prob = getattr(
          args, "speech_unsup_mask_prob", args.speech_mask_prob
      )
      args.speech_mask_selection = getattr(
          args, "speech_mask_selection", "static"
      )
      args.speech_mask_other = getattr(args, "speech_mask_other", 0)
      args.speech_mask_min_space = getattr(
          args, "speech_mask_min_space", 1
      )
      args.speech_no_mask_overlap = getattr(
          args, "speech_no_mask_overlap", False
      )
  
      args.speech_mask_channel_length = getattr(
          args, "speech_mask_channel_length", 10
      )
      args.speech_mask_channel_prob = getattr(
          args, "speech_mask_channel_prob", 0.0
      )
      args.speech_mask_channel_selection = getattr(
          args, "speech_mask_channel_selection", "static"
      )
      args.speech_mask_channel_other = getattr(
          args, "speech_mask_channel_other", 0
      )
      args.speech_mask_channel_min_space = getattr(
          args, "speech_mask_channel_min_space", 1
      )
      args.speech_no_mask_channel_overlap = getattr(
          args, "speech_no_mask_channel_overlap", False
      )
      args.no_scale_feature = getattr(args, "", False)
      args.feature_grad_mult = getattr(
          args, "feature_grad_mult", 1.0
      )  # 0.1
  
      # Transformer
      args.encoder_embed_dim = getattr(args, "encoder_embed_dim", 768)
      args.encoder_ffn_embed_dim = getattr(
          args, "encoder_ffn_embed_dim", args.encoder_embed_dim * 4
      )
      args.encoder_attention_heads = getattr(
          args, "encoder_attention_heads", 12
      )
      args.encoder_normalize_before = getattr(
          args, "encoder_normalize_before", False
      )
      args.encoder_layerdrop = getattr(args, "encoder_layerdrop", 0)
      args.encoder_learned_pos = getattr(
          args, "encoder_learned_pos", False
      )
      args.speech_conv_bias = getattr(args, "speech_conv_bias", False)
  
      args.decoder_embed_dim = getattr(
          args, "decoder_embed_dim", args.encoder_embed_dim
      )
      args.decoder_ffn_embed_dim = getattr(
          args, "decoder_ffn_embed_dim", args.encoder_ffn_embed_dim
      )
      args.decoder_attention_heads = getattr(
          args, "decoder_attention_heads", args.encoder_attention_heads
      )
      args.decoder_normalize_before = getattr(
          args, "decoder_normalize_before", False
      )
      args.decoder_learned_pos = getattr(
          args, "decoder_learned_pos", False
      )
      args.dropout = getattr(args, "dropout", 0.1)
      args.attention_dropout = getattr(
          args, "attention_dropout", args.dropout
      )
      args.activation_dropout = getattr(args, "activation_dropout", 0.0)
      args.activation_fn = getattr(
          args, "activation_fn", "relu"
      )  # gelu?
      args.adaptive_softmax_cutoff = getattr(
          args, "adaptive_softmax_cutoff", None
      )
      args.adaptive_softmax_dropout = getattr(
          args, "adaptive_softmax_dropout", 0
      )
  
      args.speech_unsup_dropout = getattr(
          args, "speech_unsup_dropout", 0
      )
      args.speech_unsup_feature_dropout = getattr(
          args, "speech_unsup_feature_dropout", 0
      )
  
      args.tie_adaptive_weights = getattr(
          args, "tie_adaptive_weights", False
      )
      args.share_decoder_input_output_embed = getattr(
          args, "share_decoder_input_output_embed", False
      )
      args.no_token_positional_embeddings = getattr(
          args, "no_token_positional_embeddings", False
      )
      args.adaptive_input = getattr(args, "adaptive_input", False)
      args.decoder_layerdrop = getattr(args, "decoder_layerdrop", 0.0)
      args.decoder_output_dim = getattr(
          args, "decoder_output_dim", args.decoder_embed_dim
      )
      args.layernorm_embedding = getattr(
          args, "layernorm_embedding", False
      )
      args.no_scale_embedding = getattr(
          args, "no_scale_embedding", False
      )
      args.quant_noise_pq = getattr(args, "quant_noise_pq", 0)
  
      args.speech_encoder_layers = getattr(
          args, "speech_encoder_layers", 12
      )
      args.text_encoder_layers = getattr(args, "text_encoder_layers", 6)
      args.encoder_shared_text_layers_from_begin = getattr(
          args, "encoder_shared_text_layers_from_begin", 6
      )
      args.decoder_layers = getattr(args, "decoder_layers", 6)
  
      args.no_emb_update_unsup = getattr(
          args, "no_emb_update_unsup", False
      )
  
imports: import logging
  from collections import OrderedDict, namedtuple
  from typing import Dict, Optional
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from fairseq import checkpoint_utils, utils
  from fairseq.file_io import PathManager
  from fairseq.models import FairseqDecoder, FairseqEncoderDecoderModel, register_model, register_model_architecture
  from fairseq.models.speech_to_text import MultiInputDecoder, MultiModalityEncoder, SpeechWavTransformerEncoder, StackedSpeechWavTransformerEncoder
  from fairseq.models.transformer import TransformerDecoder, TransformerEncoder, TransformerModel
label_desc: Use image node_id 1 for calling a global function with example usage: speech_text_pretrain_bart_base(args) without return types