code: def test_lars_cv_max_iter(recwarn):
      warnings.simplefilter("always")
      with np.errstate(divide="raise", invalid="raise"):
          X = diabetes.data
          y = diabetes.target
          rng = np.random.RandomState(42)
          x = rng.randn(len(y))
          X = diabetes.data
          X = np.c_[X, x, x]  # add correlated features
          X = StandardScaler().fit_transform(X)
          lars_cv = linear_model.LassoLarsCV(max_iter=5, cv=5)
          lars_cv.fit(X, y)
  
      # Check that there is no warning in general and no ConvergenceWarning
      # in particular.
      # Materialize the string representation of the warning to get a more
      # informative error message in case of AssertionError.
      recorded_warnings = [str(w) for w in recwarn]
      assert len(recorded_warnings) == 0
  
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 25 for calling a global function with example usage: test_lars_cv_max_iter(recwarn) without return types