code: def test_invalid_penalty(setup):
      error_msg = re.escape("Only support L2 penalty.")
  
      with pytest.raises(NotImplementedError, match=error_msg):
          model = LogisticRegression(penalty="l1")
          model.fit(X, y)
  
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 3 for calling a global function with example usage: test_invalid_penalty(setup) without return types