code: def plot(samples):
      fig = plt.figure(figsize=(4, 4))
      plt.title(str(samples))
      gs = gridspec.GridSpec(4, 4)
      gs.update(wspace=0.05, hspace=0.05)
  
      for i, sample in enumerate(samples):
          ax = plt.subplot(gs[i])
          plt.axis("off")
          ax.set_xticklabels([])
          ax.set_yticklabels([])
          ax.set_aspect("equal")
          plt.imshow(sample.reshape(28, 28), cmap="Greys_r")
  
      return fig
  
file_path: edward/examples/bigan.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  import edward
  import matplotlib.pyplot
  import matplotlib.gridspec
  import numpy
  import os
  import tensorflow
  from observations import mnist
label_desc: Use image node_id 6 for calling a global function with example usage: plot(samples) and returns: fig