code: def plot(imgs, **imshow_kwargs):
      if not isinstance(imgs[0], list):
          # Make a 2d grid even if there's just 1 row
          imgs = [imgs]
  
      num_rows = len(imgs)
      num_cols = len(imgs[0])
      _, axs = plt.subplots(
          nrows=num_rows, ncols=num_cols, squeeze=False
      )
      for row_idx, row in enumerate(imgs):
          for col_idx, img in enumerate(row):
              ax = axs[row_idx, col_idx]
              img = F.to_pil_image(img.to("cpu"))
              ax.imshow(np.asarray(img), **imshow_kwargs)
              ax.set(
                  xticklabels=[], yticklabels=[], xticks=[], yticks=[]
              )
  
      plt.tight_layout()
  
file_path: vision/gallery/others/plot_optical_flow.py
imports: import numpy
  import torch
  import matplotlib.pyplot
  import torchvision.transforms.functional
  import tempfile
  from pathlib import Path
  from urllib.request import urlretrieve
  from torchvision.io import read_video
  from torchvision.models.optical_flow import Raft_Large_Weights
  from torchvision.models.optical_flow import raft_large
  from torchvision.utils import flow_to_image
label_desc: Use image node_id 1 for calling a global function with example usage: plot(imgs) without return types