code: def cosine_proximity(y_true, y_pred):
      """Cosine similarity of two vectors.
  
      Args:
        y_true: tf.Tensor.
        y_pred: tf.Tensor.
          Tensors of same shape and type.
      """
      y_true = tf.nn.l2_normalize(y_true, len(y_true.shape) - 1)
      y_pred = tf.nn.l2_normalize(y_pred, len(y_pred.shape) - 1)
      return tf.reduce_sum(y_true * y_pred)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import six
  import tensorflow
  from edward.models import RandomVariable
  from edward.util import check_data, get_session, compute_multinomial_mode, with_binary_averaging
label_desc: Use image node_id 17 for calling a global function with example usage: cosine_proximity(y_true, y_pred) and returns: tf