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 forward(
      self,
      prev_output_tokens,
      encoder_out=None,
      incremental_state=None,
      **unused,
  ):
      decoder_phase1_output = self.decoder_phase1(
          prev_output_tokens, encoder_out, incremental_state
      )
      decoder_phase2_output = self.decoder_phase2(
          prev_output_tokens,
          encoder_out,
          decoder_phase1_output[1]["inner_states"][-1],
          incremental_state,
      )
      return decoder_phase2_output
  
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 2 for calling the TransformerTwoPhaseDecoder obj's underlying member method code with example usage: obj.forward(prev_output_tokens, encoder_out, incremental_state) and returns: decoder_phase2_output