code: def psnr_and_ssim(output, target):
      """Compute the PSNR and SSIM.
  
      Args:
        output: 4-D Tensor, shape=(num_frames, height, width, num_channels)
        target: 4-D Tensor, shape=(num_frames, height, width, num_channels)
      Returns:
        psnr: 1-D Tensor, shape=(num_frames,)
        ssim: 1-D Tensor, shape=(num_frames,)
      """
      output = tf.cast(output, dtype=tf.int32)
      target = tf.cast(target, dtype=tf.int32)
      psnr = tf.image.psnr(output, target, max_val=255)
      ssim = tf.image.ssim(output, target, max_val=255)
      return psnr, ssim
  
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 7 for calling a global function with example usage: psnr_and_ssim(output, target) and returns: psnr,  ssim