code: def dirichlet_log_prob(self, val):
      conc = self.parameters["concentration"]
      result = tf.reduce_sum((conc - 1.0) * tf.log(val), -1)
      result += tf.reduce_sum(-tf.lgamma(conc), -1)
      result += tf.lgamma(tf.reduce_sum(conc, -1))
      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 7 for calling a global function with example usage: dirichlet_log_prob(val) and returns: result