code: def test_omp_reaches_least_squares():
      # Use small simple data; it's a sanity check but OMP can stop early
      rng = check_random_state(0)
      n_samples, n_features = (10, 8)
      n_targets = 3
      X = rng.randn(n_samples, n_features)
      Y = rng.randn(n_samples, n_targets)
      omp = OrthogonalMatchingPursuit(n_nonzero_coefs=n_features)
      lstsq = LinearRegression()
      omp.fit(X, Y)
      lstsq.fit(X, Y)
      assert_array_almost_equal(omp.coef_, lstsq.coef_)
  
imports: import numpy
  import pytest
  from sklearn.datasets import make_sparse_coded_signal
  from sklearn.linear_model import LinearRegression, OrthogonalMatchingPursuit, OrthogonalMatchingPursuitCV, orthogonal_mp, orthogonal_mp_gram
  from sklearn.utils import check_random_state
  from sklearn.utils._testing import assert_allclose, assert_array_almost_equal, assert_array_equal, ignore_warnings
label_desc: Use image node_id 18 for calling a global function with example usage: test_omp_reaches_least_squares() without return types