code: def forward(
      self,
      dec_input,
      enc_output,
      self_attn_mask=None,
      dec_enc_attn_mask=None,
  ):
      if self.operation_order == (
          "self_attn",
          "norm",
          "enc_dec_attn",
          "norm",
          "ffn",
          "norm",
      ):
          dec_attn_out = self.self_attn(
              dec_input, dec_input, dec_input, self_attn_mask
          )
          dec_attn_out += dec_input
          dec_attn_out = self.norm1(dec_attn_out)
  
          enc_dec_attn_out = self.enc_attn(
              dec_attn_out, enc_output, enc_output, dec_enc_attn_mask
          )
          enc_dec_attn_out += dec_attn_out
          enc_dec_attn_out = self.norm2(enc_dec_attn_out)
  
          mlp_out = self.mlp(enc_dec_attn_out)
          mlp_out += enc_dec_attn_out
          mlp_out = self.norm3(mlp_out)
      elif self.operation_order == (
          "norm",
          "self_attn",
          "norm",
          "enc_dec_attn",
          "norm",
          "ffn",
      ):
          dec_input_norm = self.norm1(dec_input)
          dec_attn_out = self.self_attn(
              dec_input_norm,
              dec_input_norm,
              dec_input_norm,
              self_attn_mask,
          )
          dec_attn_out += dec_input
  
          enc_dec_attn_in = self.norm2(dec_attn_out)
          enc_dec_attn_out = self.enc_attn(
              enc_dec_attn_in, enc_output, enc_output, dec_enc_attn_mask
          )
          enc_dec_attn_out += dec_attn_out
  
          mlp_out = self.mlp(self.norm3(enc_dec_attn_out))
          mlp_out += enc_dec_attn_out
  
      return mlp_out
  
imports: import math
  import numpy
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddle import ParamAttr, reshape, transpose
  from paddle.nn import Conv2D, BatchNorm, Linear, Dropout
  from paddle.nn import AdaptiveAvgPool2D, MaxPool2D, AvgPool2D
  from paddle.nn.initializer import KaimingNormal, Uniform, Constant
label_desc: Use image node_id 2 for calling the TFDecoderLayer obj's underlying member method code with example usage: obj.forward(dec_input, enc_output, _attn_mask, dec_enc_attn_mask) and returns: mlp_out