code: def make_disparity_sequence_grid(
      predictions: List[Tensor], disparities: Tensor
  ) -> np.ndarray:
      # right most we will be adding the ground truth
      seq_len = len(predictions) + 1
      predictions = list(
          map(
              lambda x: x[:, :1, :, :].detach().cpu(),
              predictions + [disparities],
          )
      )
      sequence = make_disparity_sequence(predictions)
      # swap axes to have the in the correct order for each batch sample
      sequence = (
          torch.swapaxes(sequence, 0, 1)
          .contiguous()
          .reshape(-1, 1, disparities.shape[-2], disparities.shape[-1])
      )
      sequence = make_grid(
          sequence,
          nrow=seq_len,
          padding=16,
          normalize=True,
          scale_each=True,
      )
      sequence = sequence.permute(1, 2, 0).numpy()
      sequence = (sequence * 255).astype(np.uint8)
      return sequence
  
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 6 for calling a global function with example usage: make_disparity_sequence_grid(predictions, disparities) and returns: sequence