code: def test_gradcheck(self, device):
      torch.random.manual_seed(0)
      points1 = torch.rand(
          8, 2, device=device, dtype=torch.float64, requires_grad=True
      )
      points2 = torch.rand(8, 2, device=device, dtype=torch.float64)
      model = RANSAC("fundamental").to(
          device=device, dtype=torch.float64
      )
  
      def gradfun(p1, p2):
          return model(p1, p2)[0]
  
      assert gradcheck(
          gradfun, (points1, points2), raise_exception=True
      )
  
imports: import pytest
  import torch
  from torch.autograd import gradcheck
  import kornia.testing
  from kornia.geometry import RANSAC, transform_points
  from kornia.geometry.epipolar import sampson_epipolar_distance
  from kornia.testing import assert_close
label_desc: Use image node_id 7 for calling the TestRANSACFundamental obj's underlying member method code with example usage: obj.test_gradcheck(device) and returns: model