code: def test_gradcheck(self, device, dtype):
      matrix = torch.eye(2, 3, device=device, dtype=dtype)[None]
      matrix = utils.tensor_to_gradcheck_var(matrix)  # to var
      assert gradcheck(
          kornia.geometry.invert_affine_transform,
          (matrix,),
          raise_exception=True,
          fast_mode=True,
      )
  
imports: import sys
  import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia
  import kornia.testing
  from kornia.testing import assert_close
  from kornia.utils._compat import torch_version, torch_version_lt
  from kornia.utils.helpers import _torch_inverse_cast
label_desc: Use image node_id 4 for calling the TestInvertAffineTransform obj's underlying member method code with example usage: obj.test_gradcheck(device, dtype) without return types