class_docstr: Second phase of decoder layer block
      Each layer will be of type TransformerDecoderLayerPhase2
  Args:
      args (argparse.Namespace): parsed command-line arguments
      dictionary (~fairseq.data.Dictionary): encoding dictionary
      embed_tokens (torch.nn.Embedding): input embedding
      no_encoder_decoder_attn: If encoder decoder attention is required or not
docstr: Args:
      prev_output_tokens (LongTensor): previous decoder outputs of shape
          `(batch, tgt_len)`, for input feeding/teacher forcing
      encoder_out (Tensor, optional): output from the encoder, used for
          encoder-side attention
      decoder_out (Tensor, optional): output from the decoder phase1, used for
          decoder-side attention
      incremental_state (dict): dictionary used for storing state during
          :ref:`Incremental decoding`
  
  Returns:
      tuple:
          - the decoder's output of shape `(batch, tgt_len, vocab)`
          - a dictionary with any model-specific outputs
docstr_tok: ["Args",":","prev_output_tokens","(","LongTensor",")",":","previous","decoder","outputs","of","shape","`","(","batch",",","tgt_len",")","`",",","for","input","feeding\/teacher","forcing","encoder_out","(","Tensor",",","optional",")",":","output","from","the","encoder",",","used","for","encoder-side","attention","decoder_out","(","Tensor",",","optional",")",":","output","from","the","decoder","phase1",",","used","for","decoder-side","attention","incremental_state","(","dict",")",":","dictionary","used","for","storing","state","during",":","ref",":","`","Incremental","decoding","`","Returns",":","tuple",":","-","the","decoder","'s","output","of","shape","`","(","batch",",","tgt_len",",","vocab",")","`","-","a","dictionary","with","any","model-specific","outputs"]
code: def forward(
      self,
      prev_output_tokens,
      encoder_out=None,
      decoder_out=None,
      incremental_state=None,
      **unused,
  ):
      """
      Args:
          prev_output_tokens (LongTensor): previous decoder outputs of shape
              `(batch, tgt_len)`, for input feeding/teacher forcing
          encoder_out (Tensor, optional): output from the encoder, used for
              encoder-side attention
          decoder_out (Tensor, optional): output from the decoder phase1, used for
              decoder-side attention
          incremental_state (dict): dictionary used for storing state during
              :ref:`Incremental decoding`
  
      Returns:
          tuple:
              - the decoder's output of shape `(batch, tgt_len, vocab)`
              - a dictionary with any model-specific outputs
      """
      x, extra = self.extract_features(
          prev_output_tokens,
          encoder_out,
          decoder_out,
          incremental_state,
      )
      x = self.output_layer(x)
      return x, extra
  
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 TransformerDecoderPhase2 obj's underlying member method code with example usage: obj.forward(prev_output_tokens, encoder_out, decoder_out, incremental_state) and returns: x,  extra