code: def plot_image(img: torch.Tensor):
      """
      ### Plot an image with matplotlib
      """
      from matplotlib import pyplot as plt
  
      # Move tensor to CPU
      img = img.cpu()
      # Get min and max values of the image for normalization
      img_min, img_max = img.min(), img.max()
      # Scale image values to be [0...1]
      img = (img - img_min) / (img_max - img_min + 1e-5)
      # We have to change the order of dimensions to HWC.
      img = img.permute(1, 2, 0)
      # Show Image
      plt.imshow(img)
      # We don't need axes
      plt.axis("off")
      # Display
      plt.show()
  
imports: import itertools
  import random
  import zipfile
  from typing import Tuple
  import torch
  import torch.nn
  import torchvision.transforms
  from PIL import Image
  from torch.utils.data import DataLoader, Dataset
  from torchvision.transforms import InterpolationMode
  from torchvision.utils import make_grid
  from labml import lab, tracker, experiment, monit
  from labml.configs import BaseConfigs
  from labml.utils.download import download_file
  from labml.utils.pytorch import get_modules
  from labml_helpers.device import DeviceConfigs
  from labml_helpers.module import Module
label_desc: Use image node_id 4 for calling a global function with example usage: plot_image(img) without return types