code: def psnrmetric_np(max_val, y_pred, y):
      mse = np.mean((flatten(y_pred) - flatten(y)) ** 2, axis=1)
      return np.mean(20 * np.log10(max_val) - 10 * np.log10(mse))
  
file_path: MONAI/tests/test_handler_regression_metrics.py
imports: from __future__ import annotations
  import unittest
  from functools import partial
  import numpy
  import torch
  from ignite.engine import Engine
  from monai.handlers import MeanAbsoluteError, MeanSquaredError, PeakSignalToNoiseRatio, RootMeanSquaredError
  from monai.utils import set_determinism
label_desc: Use image node_id 5 for calling a global function with example usage: psnrmetric_np(max_val, y_pred, y) and returns: np