code: def prepare_image_question_encoder(image_feat, question, hparams):
      """Prepare encoder.
  
      Args:
        image_feat: a Tensor.
        question: a Tensor.
        hparams: run hyperparameters
  
      Returns:
        encoder_input: a Tensor, bottom of encoder stack
        encoder_self_attention_bias: a bias tensor for use in encoder self-attention
      """
  
      encoder_input = tf.concat([image_feat, question], axis=1)
      encoder_padding = common_attention.embedding_to_padding(
          encoder_input
      )
      ignore_padding = common_attention.attention_bias_ignore_padding(
          encoder_padding
      )
      encoder_self_attention_bias = ignore_padding
      encoder_decoder_attention_bias = ignore_padding
      # Usual case - not a packed dataset.
      if hparams.pos == "timing":
          question = common_attention.add_timing_signal_1d(question)
      elif hparams.pos == "emb":
          question = common_attention.add_positional_embedding(
              question,
              hparams.max_length,
              "inputs_positional_embedding",
              None,
          )
      encoder_input = tf.concat([image_feat, question], axis=1)
  
      return (
          encoder_input,
          encoder_self_attention_bias,
          encoder_decoder_attention_bias,
      )
  
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.layers import vqa_layers
  from tensor2tensor.models.research import vqa_attention
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  from tensorflow.contrib.layers.python.layers import utils
label_desc: Use image node_id 6 for calling a global function with example usage: prepare_image_question_encoder(image_feat, question, hparams) and returns: encoder_input,  encoder_self_attention_bias,  encoder_decoder_attention_bias