code: def test_logistic_regression_no_converge(setup, fit_intercept):
      # quite slow in local tests, so set max_iter=1
      # suggested max_iter >= 10
      model = LogisticRegression(
          fit_intercept=fit_intercept, max_iter=1
      )
      model.fit(X, y)
      model.predict(X)
      model.score(X, y)
      model.predict_proba(X)
      model.predict_log_proba(X)
  
      error_msg = re.escape(
          "X has %d features per sample; expecting %d"
          % (X.shape[1], model.coef_.shape[1] - 1)
      )
      model.coef_ = model.coef_[:, :-1]
      with pytest.raises(ValueError, match=error_msg):
          model.predict(X)
  
file_path: mars/mars/learn/glm/tests/test_logistic.py
imports: import re
  import pytest
  from sklearn.datasets import load_iris
  from .._logistic import _check_solver, _check_multi_class, LogisticRegression
label_desc: Use image node_id 6 for calling a global function with example usage: test_logistic_regression_no_converge(setup, fit_intercept) without return types