class_docstr: Two phase decoder.
  First pass will be transofrmer decoder and second pass will be
  another transformer decoder with inputs of first pass decoder and
  encoder.
  Args:
      args (argparse.Namespace): parsed command-line arguments
      dictionary (~fairseq.data.Dictionary): encoding dictionary
      embed_tokens (torch.nn.Embedding): input embedding
      no_encoder_attn_phase1: if encoder attention should be there in phase 1
      no_encoder_decoder_attn_phase2: If encoder and decoder attention should
                                      be there in phase 2
code: def __init__(
      self,
      args,
      dictionary,
      embed_tokens,
      no_encoder_attn_phase1=None,
      no_encoder_decoder_attn_phase2=None,
  ):
      super().__init__(dictionary)
      self.register_buffer("version", torch.Tensor([3]))
  
      self.decoder_phase1 = TransformerDecoder(
          args, dictionary, embed_tokens, no_encoder_attn_phase1
      )
      self.decoder_phase2 = TransformerDecoderPhase2(
          args, dictionary, embed_tokens, no_encoder_decoder_attn_phase2
      )
  
imports: import math
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import options, utils
  from fairseq.models import FairseqEncoderDecoderModel, FairseqIncrementalDecoder, register_model, register_model_architecture
  from fairseq.models.transformer import Embedding, Linear, TransformerDecoder, TransformerEncoder
  from fairseq.modules import AdaptiveSoftmax, LayerNorm, MultiheadAttention, PositionalEmbedding, SinusoidalPositionalEmbedding
label_desc: Use image node_id 1 to create a new TransformerTwoPhaseDecoder object from inherited base classes: FairseqIncrementalDecoder with example: obj = TransformerTwoPhaseDecoder(args, dictionary, embed_tokens, no_encoder_attn_phase1, no_encoder_decoder_attn_phase2)