code: def multinomial_log_prob(self, val):
      n = self.parameters["total_count"]
      probs = self.parameters["probs"]
      f_n = tf.cast(n, tf.float32)
      f_val = tf.cast(val, tf.float32)
      result = tf.reduce_sum(tf.log(probs) * f_val, -1)
      result += tf.lgamma(f_n + 1) - tf.reduce_sum(
          tf.lgamma(f_val + 1), -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 12 for calling a global function with example usage: multinomial_log_prob(val) and returns: result