code: def compute_summary_embedding(
      input_embeddings, input_lengths, hparams
  ):
      """Convert list of embedding to single embedding.
  
      Args:
        input_embeddings: <tf.float32>[bs, max_seq_len, emb_dim]
        input_lengths: <tf.int64>[bs, 1]
        hparams: model hparams
  
      Returns:
        embedding: <tf.float32>[bs, emb_dim]
      """
      if hparams.pool_technique == "average":
          return compute_average_embedding(
              input_embeddings, input_lengths
          )
      elif hparams.pool_technique == "max_pool":
          return compute_max_pool_embedding(
              input_embeddings, input_lengths
          )
      elif hparams.pool_technique == "last":
          return compute_last_embedding(
              input_embeddings, input_lengths, hparams
          )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_layers
  from tensor2tensor.models import transformer
  from tensor2tensor.utils import registry
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
label_desc: Use image node_id 4 for calling a global function with example usage: compute_summary_embedding(input_embeddings, input_lengths, hparams) and returns: compute_average_embedding, compute_max_pool_embedding, compute_last_embedding