code: def test_binary(sparse_X):
      np.random.seed(1409)
      X, y = build_dataset(
          n_samples=30, n_features=60, sparse_X=sparse_X
      )
      y = np.sign(y)
      alpha_max = norm(X.T.dot(y), ord=np.inf) / 2
      C = 20.0 / alpha_max
  
      clf = LogisticRegression(C=-1)
      np.testing.assert_raises(ValueError, clf.fit, X, y)
      tol = 1e-8
      clf = LogisticRegression(C=C, tol=tol, verbose=0)
      clf.fit(X, y)
  
      clf_sk = sklearn_Logreg(
          C=C,
          penalty="l1",
          solver="liblinear",
          fit_intercept=False,
          tol=tol,
      )
      clf_sk.fit(X, y)
      assert_allclose(clf.coef_, clf_sk.coef_, rtol=1e-3, atol=1e-5)
  
file_path: celer/celer/tests/test_logreg.py
imports: import pytest
  import numpy
  from numpy.linalg import norm
  from numpy.testing import assert_allclose, assert_array_less
  from sklearn.linear_model._logistic import _logistic_regression_path
  from sklearn.utils.estimator_checks import check_estimator
  from sklearn.linear_model import LogisticRegression
  from celer import celer_path
  from celer.dropin_sklearn import LogisticRegression
  from celer.utils.testing import build_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: test_binary(sparse_X) without return types