code: def test_lars_path_readonly_data():
      # When using automated memory mapping on large input, the
      # fold data is in read-only mode
      # This is a non-regression test for:
      # https://github.com/scikit-learn/scikit-learn/issues/4597
      splitted_data = train_test_split(X, y, random_state=42)
      with TempMemmap(splitted_data) as (
          X_train,
          X_test,
          y_train,
          y_test,
      ):
          # The following should not fail despite copy=False
          _lars_path_residues(
              X_train, y_train, X_test, y_test, copy=False
          )
  
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 27 for calling a global function with example usage: test_lars_path_readonly_data() without return types