code: def attention_lm_moe_prepare_decoder(targets, hparams):
      """Prepare one shard of the model for the decoder.
  
      Args:
        targets: a Tensor.
        hparams: run hyperparameters
  
      Returns:
        decoder_input: a Tensor, bottom of decoder stack
        decoder_self_attention_bias: a Tensor, containing large negative values
        to implement masked attention and possibly biases for diagonal alignments
        pad_remover (expert_utils.PadRemover): an util object to remove padding
      """
      targets_pad_mask = common_attention.embedding_to_padding(targets)
      with tf.name_scope("pad_remover"):
          # Because of the shift_right, the <eos> token will be considered as
          # padding. In practice, it doesn't really matter, due to the triangular
          # mask, this token should never be attended.
          pad_remover = expert_utils.PadRemover(targets_pad_mask)
  
      if hparams.prepend_mode == "prepend_inputs_full_attention":
          decoder_self_attention_bias = common_attention.attention_bias_prepend_inputs_full_attention(
              targets_pad_mask
          )
      else:
          decoder_self_attention_bias = (
              common_attention.attention_bias_lower_triangle(
                  tf.shape(targets)[1]
              )
          )
      decoder_input = common_layers.shift_right_3d(targets)
      if hparams.pos == "timing":
          decoder_input = common_attention.add_timing_signal_1d(
              decoder_input
          )
      return (decoder_input, decoder_self_attention_bias, pad_remover)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  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 expert_utils
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 1 for calling a global function with example usage: attention_lm_moe_prepare_decoder(targets, hparams) and returns: decoder_input,  decoder_self_attention_bias,  pad_remover