class_docstr: Test class for PSNRB metric.
class_docstr_tok: ["Test","class","for","PSNRB","metric","."]
docstr: Test that functional PSNRB metric returns the same result as the reference implementation.
docstr_tok: ["Test","that","functional","PSNRB","metric","returns","the","same","result","as","the","reference","implementation","."]
code: def test_psnr_functional(self, preds, target):
      """Test that functional PSNRB metric returns the same result as the reference implementation."""
      self.run_functional_metric_test(
          preds,
          target,
          peak_signal_noise_ratio_with_blocked_effect,
          _ref_metric,
      )
  
file_path: torchmetrics/tests/unittests/image/test_psnrb.py
imports: import math
  import numpy
  import pytest
  import torch
  from sewar.utils import _compute_bef
  from torchmetrics.functional.image.psnrb import peak_signal_noise_ratio_with_blocked_effect
  from torchmetrics.image import PeakSignalNoiseRatioWithBlockedEffect
  from unittests import BATCH_SIZE, NUM_BATCHES
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 2 for calling the TestPSNR obj's underlying member method code with example usage: obj.test_psnr_functional(preds, target) without return types