code: def vae_lower_bound(gen_params, rec_params, data, rs):
      # We use a simple Monte Carlo estimate of the KL
      # divergence from the prior.
      q_means, q_log_stds = nn_predict_gaussian(rec_params, data)
      latents = sample_diag_gaussian(q_means, q_log_stds, rs)
      q_latents = diag_gaussian_log_density(
          latents, q_means, q_log_stds
      )
      p_latents = diag_gaussian_log_density(latents, 0, 0)
      likelihood = p_images_given_latents(gen_params, data, latents)
      return np.mean(p_latents + likelihood - q_latents)
  
imports: from __future__ import absolute_import, division
  from __future__ import print_function
  import autograd.numpy
  import autograd.numpy.random
  import autograd.scipy.stats.norm
  from autograd.scipy.special import expit
  from autograd import grad
  from autograd.misc.optimizers import adam
  from data import load_mnist, save_images
label_desc: Use image node_id 12 for calling a global function with example usage: vae_lower_bound(gen_params, rec_params, data, rs) and returns: np