code: def test_multitarget():
      # Assure that estimators receiving multidimensional y do the right thing
      Y = np.vstack([y, y**2]).T
      n_targets = Y.shape[1]
      estimators = [
          linear_model.LassoLars(),
          linear_model.Lars(),
          # regression test for gh-1615
          linear_model.LassoLars(fit_intercept=False),
          linear_model.Lars(fit_intercept=False),
      ]
  
      for estimator in estimators:
          estimator.fit(X, Y)
          Y_pred = estimator.predict(X)
          alphas, active, coef, path = (
              estimator.alphas_,
              estimator.active_,
              estimator.coef_,
              estimator.coef_path_,
          )
          for k in range(n_targets):
              estimator.fit(X, Y[:, k])
              y_pred = estimator.predict(X)
              assert_array_almost_equal(alphas[k], estimator.alphas_)
              assert_array_almost_equal(active[k], estimator.active_)
              assert_array_almost_equal(coef[k], estimator.coef_)
              assert_array_almost_equal(path[k], estimator.coef_path_)
              assert_array_almost_equal(Y_pred[:, k], y_pred)
  
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 23 for calling a global function with example usage: test_multitarget() without return types