code: def _compute_SNR(x, y):
      noise = x - y
      noise_var = np.sum(noise**2) / len(noise) + 1e-7
      signal_energy = np.sum(y**2) / len(y)
      max_signal_energy = np.amax(y**2)
      SNR = 10 * np.log10(signal_energy / noise_var)
      PSNR = 10 * np.log10(max_signal_energy / noise_var)
      return SNR, PSNR
  
imports: import unittest
  import urllib
  import os
  import tarfile
  import zipfile
  import numpy
  import PIL.Image
  import tensorflow
  from tensorflow.core.framework import graph_pb2
  import tfcoreml
label_desc: Use image node_id 3 for calling a global function with example usage: _compute_SNR(x, y) and returns: SNR,  PSNR