code: def plot_augmented_images(
      input_images: List[Image.Image],
      collate_function: Union[
          BaseCollateFunction, MultiViewCollateFunction
      ],
  ):
      """Returns a figure showing original images in the left column and augmented images to their right.
  
      This function ignores the transforms ToTensor and Normalize for visualization purposes.
  
      Args:
          input_images:
              List of PIL images for which the augmentations should be plotted.
          collate_function:
              The collate function of the self-supervised learning algorithm.
              Must be of type BaseCollateFunction or MultiViewCollateFunction.
  
      Returns:
          A figure showing the original images in the left column and the augmented
          images to their right. If the collate_function is an instance of the
          BaseCollateFunction, two example augmentations are shown. For
          MultiViewCollateFunctions all the generated views are shown.
  
      """
  
      _check_matplotlib_available()
  
      if len(input_images) == 0:
          raise ValueError("There must be at least one input image.")
  
      grid = generate_grid_of_augmented_images(
          input_images, collate_function
      )
      grid.insert(0, input_images)
      nrows = len(input_images)
      ncols = len(grid)
  
      fig, axs = plt.subplots(
          nrows, ncols, figsize=(ncols * 1.5, nrows * 1.5)
      )
  
      for i in range(nrows):
          for j in range(ncols):
              ax = axs[i][j] if len(input_images) > 1 else axs[j]
              img = grid[j][i]
              ax.imshow(img)
              ax.set_axis_off()
  
      ax_top_left = axs[0, 0] if len(input_images) > 1 else axs[0]
      ax_top_left.set(title="Original images")
      ax_top_left.title.set_size(8)
      ax_top_next = axs[0, 1] if len(input_images) > 1 else axs[1]
      ax_top_next.set(title="Augmented images")
      ax_top_next.title.set_size(8)
      fig.tight_layout()
  
      return fig
  
file_path: lightly/lightly/utils/debug.py
imports: from typing import List, Union
  import torch
  import torchvision
  from PIL import Image
  from lightly.data.collate import BaseCollateFunction, MultiViewCollateFunction
label_desc: Use image node_id 5 for calling a global function with example usage: plot_augmented_images(input_images, collate_function) and returns: fig