code: def plot_images(
      images,
      ax,
      ims_per_row=5,
      padding=5,
      digit_dimensions=(28, 28),
      cmap=matplotlib.cm.binary,
      vmin=None,
      vmax=None,
  ):
      """Images should be a (N_images x pixels) matrix."""
      N_images = images.shape[0]
      N_rows = (N_images - 1) // ims_per_row + 1
      pad_value = np.min(images.ravel())
      concat_images = np.full(
          (
              (digit_dimensions[0] + padding) * N_rows + padding,
              (digit_dimensions[1] + padding) * ims_per_row + padding,
          ),
          pad_value,
      )
      for i in range(N_images):
          cur_image = np.reshape(images[i, :], digit_dimensions)
          row_ix = i // ims_per_row
          col_ix = i % ims_per_row
          row_start = padding + (padding + digit_dimensions[0]) * row_ix
          col_start = padding + (padding + digit_dimensions[1]) * col_ix
          concat_images[
              row_start : row_start + digit_dimensions[0],
              col_start : col_start + digit_dimensions[1],
          ] = cur_image
      cax = ax.matshow(concat_images, cmap=cmap, vmin=vmin, vmax=vmax)
      plt.xticks(np.array([]))
      plt.yticks(np.array([]))
      return cax
  
file_path: autograd/examples/data.py
imports: from __future__ import absolute_import
  import matplotlib.pyplot
  import matplotlib.image
  import autograd.numpy
  import autograd.numpy.random
  import data_mnist
label_desc: Use image node_id 2 for calling a global function with example usage: plot_images(images, ax, ims_per_row, padding, digit_dimensions, cmap, vmin, vmax) and returns: cax