code: def variational_lower_bound(
      params, t, logprob, sampler, log_density, num_samples, rs
  ):
      """Provides a stochastic estimate of the variational lower bound,
      for any variational family and model density."""
      samples = sampler(params, num_samples, rs)
      log_qs = log_density(params, samples)
      log_ps = logprob(samples, t)
      log_ps = np.reshape(log_ps, (num_samples, -1))
      log_qs = np.reshape(log_qs, (num_samples, -1))
      return np.mean(log_ps - log_qs)
  
file_path: autograd/examples/mixture_variational_inference.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  import matplotlib.pyplot
  import autograd.numpy
  import autograd.numpy.random
  import autograd.scipy.stats.norm
  from autograd.scipy.special import logsumexp
  from autograd import grad
  from autograd.misc.optimizers import adam
label_desc: Use image node_id 5 for calling a global function with example usage: variational_lower_bound(params, t, logprob, sampler, log_density, num_samples, rs) and returns: np