code: def compute_video_metrics_from_predictions(
      predictions, decode_hparams
  ):
      """Computes metrics from predictions.
  
      Args:
        predictions: list of list of dicts.
                     outer length: num_decodes, inner_length: num_samples
        decode_hparams: Decode hparams. instance of HParams.
      Returns:
        statistics: dict of Tensors, key being the metric with each Tensor
                    having the shape (num_samples, num_frames).
      """
      all_results = {}
  
      ssim_all_decodes, psnr_all_decodes = [], []
      for single_decode in predictions:
          args = get_zipped_dataset_from_predictions(single_decode)
          psnr_single, ssim_single = compute_one_decoding_video_metrics(
              *args
          )
          psnr_all_decodes.append(psnr_single)
          ssim_all_decodes.append(ssim_single)
      psnr_all_decodes = np.array(psnr_all_decodes)
      ssim_all_decodes = np.array(ssim_all_decodes)
      all_results.update(
          {"PSNR": psnr_all_decodes, "SSIM": ssim_all_decodes}
      )
      return compute_all_metrics_statistics(all_results)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import numpy
  import six
  import tensorflow.compat.v1
label_desc: Use image node_id 13 for calling a global function with example usage: compute_video_metrics_from_predictions(predictions, decode_hparams) and returns: compute_all_metrics_statistics