code: def test_gradcheck(self, device):
      # input data
      dtype = torch.float64
      img1 = torch.rand(1, 1, 5, 5, device=device, dtype=dtype)
      img2 = torch.rand(1, 1, 5, 5, device=device, dtype=dtype)
  
      # evaluate function gradient
      img1 = utils.tensor_to_gradcheck_var(img1)  # to var
      img2 = utils.tensor_to_gradcheck_var(img2)  # to var
  
      loss = kornia.losses.MS_SSIMLoss().to(device, dtype)
  
      assert gradcheck(
          loss,
          (img1, img2),
          raise_exception=True,
          nondet_tol=1e-8,
          fast_mode=True,
      )
  
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.testing import BaseTester, assert_close
label_desc: Use image node_id 4 for calling the TestMS_SSIMLoss obj's underlying member method code with example usage: obj.test_gradcheck(device) without return types