code: def build_decoder(cls, args, task, embed_tokens):
      _args = copy.deepcopy(args)
      if args.adaptor_proj or args.encoder_proj:  # not V0 arch
          _args.encoder_embed_dim = _args.decoder_embed_dim
      _args.dropout = args.decoder_dropout
      _args.attention_dropout = args.decoder_attention_dropout
      _args.activation_dropout = args.decoder_activation_dropout
      _args.layerdrop = _args.decoder_layerdrop
  
      decoder = TransformerDecoder(
          _args, task.target_dictionary, embed_tokens
      )
      decoder = cls.maybe_load_pretrained(
          decoder, getattr(args, "load_pretrained_decoder_from", None)
      )
  
      for k, p in decoder.named_parameters():
          p.requires_grad = need_finetuning(
              args.finetune_decoder_params, k
          )
      return decoder
  
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 9 for calling the XMTransformerModel obj's underlying member method code with example usage: obj.build_decoder(cls, args, task, embed_tokens) and returns: decoder