code: def make_prediction_image_side_to_side(
      predictions: Tensor,
      disparities: Tensor,
      valid_mask: Tensor,
      save_path: str,
      prefix: str,
  ) -> None:
      import matplotlib.pyplot as plt
  
      # normalize the predictions and disparities in [0, 1]
      predictions = (predictions - predictions.min()) / (
          predictions.max() - predictions.min()
      )
      disparities = (disparities - disparities.min()) / (
          disparities.max() - disparities.min()
      )
      predictions = predictions * valid_mask
      disparities = disparities * valid_mask
  
      predictions = predictions.detach().cpu()
      disparities = disparities.detach().cpu()
  
      for idx, (pred, gt) in enumerate(zip(predictions, disparities)):
          pred = pred.permute(1, 2, 0).numpy()
          gt = gt.permute(1, 2, 0).numpy()
          # plot pred and gt side by side
          fig, ax = plt.subplots(1, 2, figsize=(10, 5))
          ax[0].imshow(pred)
          ax[0].set_title("Prediction")
          ax[1].imshow(gt)
          ax[1].set_title("Ground Truth")
          save_name = os.path.join(
              save_path, "{}_{}.png".format(prefix, idx)
          )
          plt.savefig(save_name)
          plt.close()
  
file_path: vision/references/depth/stereo/visualization.py
imports: import os
  from typing import List
  import numpy
  import torch
  from torch import Tensor
  from torchvision.utils import make_grid
label_desc: Use image node_id 7 for calling a global function with example usage: make_prediction_image_side_to_side(predictions, disparities, valid_mask, save_path, prefix) without return types