code: def test_fit_linear_binary_l1r(bin_dense_train_data):
      bin_dense, bin_target = bin_dense_train_data
      clf = CDClassifier(C=1.0, random_state=0, penalty="l1")
      clf.fit(bin_dense, bin_target)
      assert not hasattr(clf, "predict_proba")
      acc = clf.score(bin_dense, bin_target)
      np.testing.assert_almost_equal(acc, 1.0)
      n_nz = clf.n_nonzero()
      perc = clf.n_nonzero(percentage=True)
      assert perc == n_nz / bin_dense.shape[1]
  
      clf = CDClassifier(C=0.1, random_state=0, penalty="l1")
      clf.fit(bin_dense, bin_target)
      acc = clf.score(bin_dense, bin_target)
      np.testing.assert_almost_equal(acc, 0.97)
      n_nz2 = clf.n_nonzero()
      perc2 = clf.n_nonzero(percentage=True)
      assert perc2 == n_nz2 / bin_dense.shape[1]
  
      assert n_nz > n_nz2
  
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 2 for calling a global function with example usage: test_fit_linear_binary_l1r(bin_dense_train_data) without return types