code: def test_lars_cv():
      # Test the LassoLarsCV object by checking that the optimal alpha
      # increases as the number of samples increases.
      # This property is not actually guaranteed in general and is just a
      # property of the given dataset, with the given steps chosen.
      old_alpha = 0
      lars_cv = linear_model.LassoLarsCV()
      for length in (400, 200, 100):
          X = diabetes.data[:length]
          y = diabetes.target[:length]
          lars_cv.fit(X, y)
          np.testing.assert_array_less(old_alpha, lars_cv.alpha_)
          old_alpha = lars_cv.alpha_
      assert not hasattr(lars_cv, "n_nonzero_coefs")
  
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 24 for calling a global function with example usage: test_lars_cv() without return types