code: def test_simple():
      # Principle of Lars is to keep covariances tied and decreasing
  
      # also test verbose output
      import sys
      from io import StringIO
  
      old_stdout = sys.stdout
      try:
          sys.stdout = StringIO()
  
          _, _, coef_path_ = linear_model.lars_path(
              X, y, method="lar", verbose=10
          )
  
          sys.stdout = old_stdout
  
          for i, coef_ in enumerate(coef_path_.T):
              res = y - np.dot(X, coef_)
              cov = np.dot(X.T, res)
              C = np.max(abs(cov))
              eps = 1e-3
              ocur = len(cov[C - eps < abs(cov)])
              if i < X.shape[1]:
                  assert ocur == i + 1
              else:
                  # no more than max_pred variables can go into the active set
                  assert ocur == X.shape[1]
      finally:
          sys.stdout = old_stdout
  
imports: import warnings
  import numpy
  import pytest
  from scipy import linalg
  from sklearn import datasets, linear_model
  from sklearn.base import clone
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.linear_model import Lars, LarsCV, LassoLars, LassoLarsCV, LassoLarsIC, lars_path
  from sklearn.linear_model._least_angle import _lars_path_residues
  from sklearn.model_selection import train_test_split
  from sklearn.pipeline import make_pipeline
  from sklearn.preprocessing import StandardScaler
  from sklearn.utils._testing import TempMemmap, assert_allclose, assert_array_almost_equal, ignore_warnings
label_desc: Use image node_id 1 for calling a global function with example usage: test_simple() without return types