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
  
file_path: MMdnn/tests/utils.py
imports: from __future__ import absolute_import
  from __future__ import print_function
  import os
  import unittest
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _compute_SNR(x, y) and returns: SNR,  PSNR