code: def attention_lm_decoder(
      decoder_input,
      decoder_self_attention_bias,
      hparams,
      name="decoder",
  ):
      """A stack of attention_lm layers.
  
      Args:
        decoder_input: a Tensor
        decoder_self_attention_bias: bias Tensor for self-attention
          (see common_attention.attention_bias())
        hparams: hyperparameters for model
        name: a string
  
      Returns:
        y: a Tensors
      """
      x = decoder_input
      with tf.variable_scope(name):
          for layer in range(hparams.num_hidden_layers):
              with tf.variable_scope("layer_%d" % layer):
                  with tf.variable_scope("self_attention"):
                      y = common_attention.multihead_attention(
                          common_layers.layer_preprocess(x, hparams),
                          None,
                          decoder_self_attention_bias,
                          hparams.attention_key_channels
                          or hparams.hidden_size,
                          hparams.attention_value_channels
                          or hparams.hidden_size,
                          hparams.hidden_size,
                          hparams.num_heads,
                          hparams.attention_dropout,
                      )
                      x = common_layers.layer_postprocess(x, y, hparams)
                  with tf.variable_scope("ffn"):
                      y = common_layers.conv_hidden_relu(
                          common_layers.layer_preprocess(x, hparams),
                          hparams.filter_size,
                          hparams.hidden_size,
                          dropout=hparams.relu_dropout,
                      )
                      x = common_layers.layer_postprocess(x, y, hparams)
          return common_layers.layer_preprocess(x, hparams)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from six.moves import range
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.utils import contrib
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
label_desc: Use image node_id 2 for calling a global function with example usage: attention_lm_decoder(decoder_input, decoder__attention_bias, hparams, name) and returns: common_layers