code: def test_max_alpha_squared_loss(l1_ratio):
      """Tests that models with L1 regularization over the theoretical bound \
      are full of zeros, for logistic regression."""
      X, y, _, _, mask_, X_ = _make_data()
  
      reg = BaseSpaceNet(
          mask=mask_,
          max_iter=10,
          penalty="graph-net",
          is_classif=False,
          verbose=0,
      )
  
      reg.l1_ratios = l1_ratio
      reg.alphas = np.max(np.dot(X.T, y)) / l1_ratio
      reg.fit(X_, y)
      assert_almost_equal(reg.coef_, 0.0)
  
imports: import numpy
  import pytest
  import scipy
  from nibabel import Nifti1Image
  from numpy.testing import assert_almost_equal
  from scipy import linalg
  from nilearn.decoding._objective_functions import divergence, gradient
  from nilearn.decoding.space_net import BaseSpaceNet
  from nilearn.decoding.space_net_solvers import _graph_net_adjoint_data_function, _graph_net_data_function, _logistic_data_loss_and_spatial_grad, _logistic_data_loss_and_spatial_grad_derivative, _logistic_derivative_lipschitz_constant, _squared_loss_and_spatial_grad, _squared_loss_and_spatial_grad_derivative, _squared_loss_derivative_lipschitz_constant, mfista
  from nilearn.decoding.tests._testing import create_graph_net_simulation_data
  from .test_same_api import to_niimgs
label_desc: Use image node_id 11 for calling a global function with example usage: test_max_alpha_squared_loss(l1_ratio) without return types