code: def test_log_reg_vs_graph_net_two_classes_iris(
      C=0.01, tol=1e-10, zero_thr=1e-4
  ):
      """Test for one of the extreme cases of Graph-Net.
  
      That is, with l1_ratio = 1 (pure Lasso),
      we compare Graph-Net's coefficients'
      performance with the coefficients obtained from Scikit-Learn's
      LogisticRegression, with L1 penalty, in a 2 classes classification task.
      """
      iris = load_iris()
      X, y = iris.data, iris.target
      y = 2 * (y > 0) - 1
      X_, mask = to_niimgs(X, (2, 2, 2))
  
      tvl1 = SpaceNetClassifier(
          mask=mask,
          alphas=1.0 / C / X.shape[0],
          l1_ratios=1.0,
          tol=tol,
          verbose=0,
          max_iter=1000,
          penalty="tv-l1",
          standardize=False,
          screening_percentile=100.0,
      ).fit(X_, y)
  
      sklogreg = LogisticRegression(
          penalty="l1",
          fit_intercept=True,
          solver="liblinear",
          tol=tol,
          C=C,
      ).fit(X, y)
  
      # compare supports
      assert_array_equal(
          (np.abs(tvl1.coef_) < zero_thr),
          (np.abs(sklogreg.coef_) < zero_thr),
      )
  
      # compare predictions
      assert_array_equal(tvl1.predict(X_), sklogreg.predict(X))
  
imports: from functools import partial
  import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from scipy import linalg
  from sklearn.datasets import load_iris
  from sklearn.linear_model import Lasso, LogisticRegression
  from sklearn.linear_model._coordinate_descent import _alpha_grid
  from sklearn.metrics import accuracy_score
  from nilearn._utils.param_validation import adjust_screening_percentile
  from nilearn.decoding.space_net import BaseSpaceNet, SpaceNetClassifier, SpaceNetRegressor, _crop_mask, _EarlyStoppingCallback, _space_net_alpha_grid, _univariate_feature_screening, path_scores
  from nilearn.decoding.space_net_solvers import graph_net_logistic, graph_net_squared_loss
  from nilearn.decoding.tests._testing import create_graph_net_simulation_data
  from nilearn.image import get_data
  from .test_same_api import to_niimgs
label_desc: Use image node_id 12 for calling a global function with example usage: test_log_reg_vs_graph_net_two_classes_iris(C, tol, zero_thr) without return types