code: def test_baseestimator_invalid_l1_ratio():
      with pytest.raises(ValueError):
          BaseSpaceNet(l1_ratios=2.0)
  
file_path: nilearn/nilearn/decoding/tests/test_objective_functions.py
imports: import numpy
  import pytest
  from numpy.testing import assert_almost_equal, assert_array_equal
  from scipy.optimize import check_grad
  from nilearn.decoding._objective_functions import divergence_id, gradient_id, logistic_loss, logistic_loss_grad
  from nilearn.decoding.space_net import BaseSpaceNet
label_desc: Use image node_id 6 for calling a global function with example usage: test_baseestimator_invalid_l1_ratio() without return types