code: def attention_bias_ignore_padding(memory_padding, bias_value=-1e18):
      """Create an bias tensor to be added to attention logits.
  
      Args:
          memory_padding: a float `Tensor` with shape [batch, memory_length].
  
      Returns:
          a `Tensor` with shape [batch, 1, 1, memory_length].
          each dim corresponding to batch_size, num_heads, queries_len,
          memory_length
      """
      ret = memory_padding * bias_value
      return tf.expand_dims(tf.expand_dims(ret, axis=1), axis=1)
  
imports: import numpy
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: attention_bias_ignore_padding(memory_padding, bias_value) and returns: tf