code: def test_ransac_geometric():
      rng = np.random.default_rng(12373240)
  
      # generate original data without noise
      src = 100 * rng.random((50, 2))
      model0 = AffineTransform(
          scale=(0.5, 0.3), rotation=1, translation=(10, 20)
      )
      dst = model0(src)
  
      # add some faulty data
      outliers = (0, 5, 20)
      dst[outliers[0]] = (10000, 10000)
      dst[outliers[1]] = (-100, 100)
      dst[outliers[2]] = (50, 50)
  
      # estimate parameters of corrupted data
      model_est, inliers = ransac(
          (src, dst), AffineTransform, 2, 20, rng=rng
      )
  
      # test whether estimated parameters equal original parameters
      assert_almost_equal(model0.params, model_est.params)
      assert np.all(np.nonzero(inliers == False)[0] == outliers)
  
imports: import numpy
  import pytest
  from skimage._shared import testing
  from skimage._shared._warnings import expected_warnings
  from skimage._shared.testing import arch32, assert_almost_equal, assert_array_less, assert_equal, xfail
  from skimage.measure import CircleModel, EllipseModel, LineModelND, ransac
  from skimage.measure.fit import _dynamic_max_trials
  from skimage.transform import AffineTransform
label_desc: Use image node_id 22 for calling a global function with example usage: test_ransac_geometric() without return types