code: def test_fit_reg_squared_l1(train_data):
      X, y = train_data
      clf = CDRegressor(
          C=1.0,
          random_state=0,
          penalty="l1",
          loss="squared",
          max_iter=100,
      )
      clf.fit(X, y)
      y_pred = (clf.predict(X) > 0.5).astype(int)
      acc = np.mean(y == y_pred)
      np.testing.assert_almost_equal(acc, 1.0, 3)
  
imports: import numpy
  import pytest
  from sklearn.datasets import load_digits
  from sklearn.preprocessing import LabelBinarizer
  from lightning.impl.primal_cd import CDClassifier, CDRegressor
  from lightning.impl.tests.utils import check_predict_proba
label_desc: Use image node_id 29 for calling a global function with example usage: test_fit_reg_squared_l1(train_data) without return types