code: def mvn_plot_contours(z, label=False, ax=None):
      """Plot the contours of 2-d Normal or MultivariateNormal object.
      Scale the axes to show 3 standard deviations.
      """
      sess = ed.get_session()
      mu = sess.run(z.parameters["loc"])
      mu_x, mu_y = mu
      Sigma = sess.run(z.parameters["scale_tril"])
      sigma_x, sigma_y = np.sqrt(Sigma[0, 0]), np.sqrt(Sigma[1, 1])
      xmin, xmax = mu_x - 3 * sigma_x, mu_x + 3 * sigma_x
      ymin, ymax = mu_y - 3 * sigma_y, mu_y + 3 * sigma_y
      xs = np.linspace(xmin, xmax, num=100)
      ys = np.linspace(ymin, ymax, num=100)
      X, Y = np.meshgrid(xs, ys)
      T = tf.cast(np.c_[X.flatten(), Y.flatten()], dtype=tf.float32)
      Z = sess.run(tf.exp(z.log_prob(T))).reshape((len(xs), len(ys)))
      if ax is None:
          fig, ax = plt.subplots()
      cs = ax.contour(X, Y, Z)
      if label:
          plt.clabel(cs, inline=1, fontsize=10)
  
file_path: edward/examples/normal.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import edward
  import numpy
  import tensorflow
  from matplotlib import pyplot
  from edward.models import Empirical, MultivariateNormalTriL
label_desc: Use image node_id 1 for calling a global function with example usage: mvn_plot_contours(z, label, ax) without return types