code: def test_metric(self, device, dtype):
      sample = torch.ones(1, device=device, dtype=dtype)
      expected = torch.tensor(20.0, device=device, dtype=dtype)
      actual = kornia.metrics.psnr(sample, 1.2 * sample, 2.0)
      assert_close(actual, expected)
  
imports: import pytest
  import torch
  import kornia
  from kornia.testing import BaseTester, assert_close, tensor_to_gradcheck_var
label_desc: Use image node_id 1 for calling the TestPsnr obj's underlying member method code with example usage: obj.test_metric(device, dtype) without return types