code: def test_gradcheck(self, device, dtype):
      sample = torch.rand(2, 3, 3, 2, device=device, dtype=dtype)
      sample = utils.tensor_to_gradcheck_var(sample)  # to var
      assert gradcheck(
          kornia.geometry.subpix.spatial_soft_argmax2d,
          (sample),
          raise_exception=True,
          fast_mode=True,
      )
  
imports: import torch
  from torch.autograd import gradcheck
  from torch.nn.functional import mse_loss
  import kornia
  import kornia.testing
  from kornia.geometry.subpix.spatial_soft_argmax import _get_center_kernel2d, _get_center_kernel3d
  from kornia.testing import assert_close
label_desc: Use image node_id 8 for calling the TestSpatialSoftArgmax2d obj's underlying member method code with example usage: obj.test_gradcheck(device, dtype) without return types