code: def test_lars_model(
      datatype, nrows, column_info, precompute, normalize
  ):
      ncols, n_info = column_info
      X_train, X_test, y_train, y_test = make_regression_dataset(
          datatype, nrows, ncols, n_info
      )
  
      if precompute == "precompute" or not normalize:
          # Apply normalization manually, because the solver expects normalized
          # input data
          X_train, y_train, x_mean, x_scale, y_mean = normalize_data(
              X_train, y_train
          )
          y_test = y_test - y_mean
          X_test = (X_test - x_mean) / x_scale
  
      if precompute == "precompute":
          precompute = np.dot(X_train.T, X_train)
  
      params = {"precompute": precompute, "normalize": normalize}
  
      # Initialization of cuML's LARS
      culars = cuLars(**params)
  
      # fit and predict cuml LARS
      culars.fit(X_train, y_train)
  
      cu_score_train = culars.score(X_train, y_train)
      cu_score_test = culars.score(X_test, y_test)
  
      if nrows < 500000:
          # sklearn model initialization, fit and predict
          sklars = skLars(**params)
          sklars.fit(X_train, y_train)
          # Set tolerance to include the 95% confidence interval around
          # scikit-learn accuracy.
          accuracy_target = sklars.score(X_test, y_test)
          tol = 1.96 * np.sqrt(
              accuracy_target * (1.0 - accuracy_target) / 100.0
          )
          if tol < 0.001:
              tol = 0.001  # We allow at least 0.1% tolerance
          print(cu_score_train, cu_score_test, accuracy_target, tol)
          assert cu_score_train >= sklars.score(X_train, y_train) - tol
          assert cu_score_test >= accuracy_target - tol
      else:
          assert cu_score_test > 0.95
  
file_path: cuml/python/cuml/tests/test_lars.py
imports: import sklearn
  from sklearn.linear_model import Lars
  from sklearn.datasets import fetch_california_housing
  from cuml.testing.utils import array_equal, unit_param, quality_param, stress_param
  from cuml.experimental.linear_model import Lars
  import sys
  import pytest
  from cuml.internals.safe_imports import cpu_only_import
  from cuml.internals.safe_imports import gpu_only_import
  from test_linear_model import make_regression_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_lars_model(datatype, nrows, column_info, precompute, normalize) without return types