def draw_image(self, metric, limit=5):
        """Display a series of images at different time steps."""
        rows = 1
        cols = limit
        self.ax.axis("off")
        # Take the Axes gridspec and divide it into a grid
        gs = matplotlib.gridspec.GridSpecFromSubplotSpec(
            rows, cols, subplot_spec=self.gs)
        # Loop through images in last few steps
        for i, image in enumerate(metric.data[-cols:]):
            ax = self.figure.add_subplot(gs[0, i])
            ax.axis('off')
            ax.set_title(metric.formatted_steps[-cols:][i])
            ax.imshow(norm(image))
Display a series of images at different time steps.