code: def test_gradcheck(self, device):
      im = torch.rand(
          1,
          1,
          15,
          15,
          device=device,
          dtype=torch.float64,
          requires_grad=True,
      )
      K = torch.rand(3, 3, device=device, dtype=torch.float64)
      distCoeff = torch.rand(4, device=device, dtype=torch.float64)
  
      gradcheck(undistort_image, (im, K, distCoeff))
  
imports: import pytest
  import torch
  from kornia.geometry.calibration.undistort import undistort_image, undistort_points
  from kornia.testing import assert_close, gradcheck
label_desc: Use image node_id 6 for calling the TestUndistortImage obj's underlying member method code with example usage: obj.test_gradcheck(device) without return types