code: def mvn_diag_log_prob(self, val):
      loc = self.parameters["loc"]
      scale_diag = self.parameters["scale_diag"]
      prec = tf.reciprocal(tf.square(scale_diag))
      result = prec * (
          -0.5 * tf.square(val) - 0.5 * tf.square(loc) + val * loc
      )
      result -= tf.log(scale_diag) + 0.5 * tf.log(2 * np.pi)
      return result
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import numpy
  import tensorflow
  from edward.models.random_variables import *
label_desc: Use image node_id 13 for calling a global function with example usage: mvn_diag_log_prob(val) and returns: result