code: def transformer_decoder_block(
      name, n_layers, x, x_mask, output_size, init, **kwargs
  ):
      """A transformation block composed of transformer decoder layers.
  
      Args:
        name: variable scope.
        n_layers: number of transformer layers.
        x: input to transformation.
        x_mask: mask.
        output_size: output dimensionality.
        init: data-dependent init for weightnorm parameters.
        **kwargs: Constains hparams, encoder_output,
          encoder_decoder_attention_bias and decoder_self_attention_bias
  
      Returns:
        outputs: Tensor of shape [batch_size, length, output_size].
      """
      with tf.variable_scope(name, reuse=tf.AUTO_REUSE):
          hparams = kwargs.pop("hparams")
          disable_dropout = kwargs.pop("disable_dropout")
          if disable_dropout:
              hparams = copy.deepcopy(hparams)
              hparams.attention_dropout = 0.0
              hparams.layer_prepostprocess_dropout = 0.0
              hparams.relu_dropout = 0.0
          n_channels = common_layers.shape_list(x)[-1]
          if n_channels != hparams.hidden_size:
              hparams = copy.deepcopy(hparams)
              hparams.hidden_size = n_channels
  
          outputs = common_attention.add_timing_signal_1d(x)
          with tf.variable_scope("decoder", reuse=tf.AUTO_REUSE):
              for layer_idx in range(n_layers):
                  outputs = transformer_decoder_layer(
                      decoder_input=outputs,
                      layer_idx=layer_idx,
                      hparams=hparams,
                      **kwargs,
                  )
          outputs = common_layers.layer_preprocess(outputs, hparams)
          outputs = dense_weightnorm(
              "h2o",
              outputs,
              output_size,
              x_mask,
              init_scale=0.0,
              init=init,
          )
          return outputs
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import copy
  import math
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.models.transformer import transformer_decoder_layer
  import tensorflow.compat.v1
  import tensorflow_probability
label_desc: Use image node_id 3 for calling a global function with example usage: transformer_decoder_block(name, n_layers, x, x_mask, output_size, init) and returns: outputs