code: def make_grid(image_batch):
      """
      Turns a batch of images into one big image.
      :param image_batch: ndarray, shape (batch_size, rows, cols, channels)
      :returns : a big image containing all `batch_size` images in a grid
      """
      m, ir, ic, ch = image_batch.shape
  
      pad = 3
  
      padded = np.zeros((m, ir + pad * 2, ic + pad * 2, ch))
      padded[:, pad:-pad, pad:-pad, :] = image_batch
  
      m, ir, ic, ch = padded.shape
  
      pr = int(np.sqrt(m))
      pc = int(np.ceil(float(m) / pr))
      extra_m = pr * pc
      assert extra_m > m
  
      padded = np.concatenate(
          (padded, np.zeros((extra_m - m, ir, ic, ch))), axis=0
      )
  
      row_content = np.split(padded, pr)
      row_content = [np.split(content, pc) for content in row_content]
      rows = [
          np.concatenate(content, axis=2) for content in row_content
      ]
      grid = np.concatenate(rows, axis=1)
      assert grid.shape[0] == 1, grid.shape
      grid = grid[0]
  
      return grid
  
file_path: cleverhans/cleverhans/plot/image.py
imports: from tempfile import mkstemp
  import os
  import platform
  import numpy
  from PIL import Image
  from cleverhans.utils import shell_call
label_desc: Use image node_id 4 for calling a global function with example usage: make_grid(image_batch) and returns: grid