code: def embedding_to_padding(emb):
      """Input embeddings -> is_padding."""
      emb_sum = tf.reduce_sum(tf.abs(emb), axis=-1, keep_dims=True)
      return tf.to_float(tf.equal(emb_sum, 0.0))
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from six.moves import range
  from six.moves import zip
  from tensor2tensor.layers import common_attention
  from tensor2tensor.layers import common_hparams
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import modalities
  from tensor2tensor.utils import registry
  from tensor2tensor.utils import t2t_model
  import tensorflow.compat.v1
label_desc: Use image node_id 7 for calling a global function with example usage: embedding_to_padding(emb) and returns: tf