code: def test_univariate_feature_screening(
      rng, is_classif, dim=(11, 12, 13), n_samples=10
  ):
      mask = rng.random(dim) > 100.0 / np.prod(dim)
  
      assert mask.sum() >= 100.0
  
      mask[
          dim[0] // 2, dim[1] // 3 :, -dim[2] // 2 :
      ] = 1  # put spatial structure
      n_features = mask.sum()
      X = rng.standard_normal((n_samples, n_features))
      w = rng.standard_normal(n_features)
      w[rng.random(n_features) > 0.8] = 0.0
      y = X.dot(w)
  
      X_, mask_, support_ = _univariate_feature_screening(
          X, y, mask, is_classif, 20.0
      )
      n_features_ = support_.sum()
  
      assert X_.shape[1] == n_features_
      assert mask_.sum() == n_features_
      assert n_features_ <= n_features
  
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 15 for calling a global function with example usage: test_univariate_feature_screening(rng, is_classif, dim, n_samples) without return types