code: def test_dirty_points(self, device, dtype):
      # generate input data
      torch.random.manual_seed(0)
  
      H = torch.eye(3, dtype=dtype, device=device)
      H[:2] = H[:2] + 0.1 * torch.rand_like(H[:2])
      H[2:, :2] = H[2:, :2] + 0.001 * torch.rand_like(H[2:, :2])
  
      points_src_st = 100.0 * torch.rand(
          1, 20, 2, device=device, dtype=dtype
      )
      points_src_end = 100.0 * torch.rand(
          1, 20, 2, device=device, dtype=dtype
      )
  
      points_dst_st = transform_points(H[None], points_src_st)
      points_dst_end = transform_points(H[None], points_src_end)
  
      # making last point an outlier
      points_dst_st[:, -1, :] += 800
      ls1 = torch.stack([points_src_st, points_src_end], dim=2)
      ls2 = torch.stack([points_dst_st, points_dst_end], dim=2)
  
      ransac = RANSAC(
          "homography_from_linesegments", inl_th=0.5, max_iter=20
      ).to(device=device, dtype=dtype)
      # compute transform from source to target
      dst_homo_src, _ = ransac(ls1[0], ls2[0])
  
      assert_close(
          transform_points(dst_homo_src[None], points_src_st[:, :-1]),
          points_dst_st[:, :-1],
          rtol=1e-3,
          atol=1e-3,
      )
  
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 2 for calling the TestRANSACHomographyLineSegments obj's underlying member method code with example usage: obj.test_dirty_points(device, dtype) without return types