code: def _univariate_feature_screening(
      X, y, mask, is_classif, screening_percentile, smoothing_fwhm=2.0
  ):
      """Select the most import features, via a univariate test.
  
      Parameters
      ----------
      X : ndarray, shape (n_samples, n_features)
          Design matrix.
  
      y : ndarray, shape (n_samples,)
          Response Vector.
  
      mask: ndarray or booleans, shape (nx, ny, nz)
          Mask defining brain Rois.
  
      is_classif: bool
          Flag telling whether the learning task is classification or regression.
  
      screening_percentile : float in the closed interval [0., 100.]
          Only the `screening_percentile * 100" percent most import voxels will
          be retained.
      %(smoothing_fwhm)s
          Default=2.
  
      Returns
      -------
      X_: ndarray, shape (n_samples, n_features_)
          Reduced design matrix with only columns corresponding to the voxels
          retained after screening.
  
      mask_ : ndarray of booleans, shape (nx, ny, nz)
          Mask with support reduced to only contain voxels retained after
          screening.
  
      support : ndarray of ints, shape (n_features_,)
          Support of the screened mask, as a subset of the support of the
          original mask.
      """
      # smooth the data (with isotropic Gaussian kernel) before screening
      if smoothing_fwhm > 0.0:
          sX = np.empty(X.shape)
          for sample in range(sX.shape[0]):
              sX[sample] = gaussian_filter(
                  unmask_from_to_3d_array(
                      X[sample].copy(), mask  # avoid modifying X
                  ),
                  (smoothing_fwhm, smoothing_fwhm, smoothing_fwhm),
              )[mask]
      else:
          sX = X
  
      # do feature screening proper
      selector = SelectPercentile(
          f_classif if is_classif else f_regression,
          percentile=screening_percentile,
      ).fit(sX, y)
      support = selector.get_support()
  
      # erode and then dilate mask, thus obtaining a "cleaner" version of
      # the mask on which a spatial prior actually makes sense
      mask_ = mask.copy()
      mask_[mask] = support > 0
      mask_ = binary_dilation(binary_erosion(mask_)).astype(bool)
      mask_[np.logical_not(mask)] = 0
      support = mask_[mask]
      X = X[:, support]
  
      return X, mask_, support
  
imports: import collections
  import sys
  import time
  import warnings
  from functools import partial
  import numpy
  from joblib import Memory, Parallel, delayed
  from scipy import stats
  from scipy.ndimage import binary_dilation, binary_erosion, gaussian_filter
  from sklearn.feature_selection import SelectPercentile, f_classif, f_regression
  from sklearn.linear_model import LinearRegression
  from sklearn.linear_model._base import _preprocess_data
  from sklearn.metrics import accuracy_score
  from sklearn.model_selection import check_cv
  from sklearn.preprocessing import LabelBinarizer
  from sklearn.utils import check_array, check_X_y
  from sklearn.utils.extmath import safe_sparse_dot
  from nilearn._utils.masker_validation import check_embedded_masker
  from nilearn.experimental.surface import SurfaceMasker
  from nilearn.image import get_data
  from nilearn.masking import unmask_from_to_3d_array
  from .._utils import fill_doc
  from .._utils.cache_mixin import CacheMixin
  from .._utils.param_validation import adjust_screening_percentile
  from .space_net_solvers import graph_net_logistic, graph_net_squared_loss, tvl1_solver
label_desc: Use image node_id 2 for calling a global function with example usage: _univariate_feature_screening(X, y, mask, is_classif, screening_percentile, smoothing_fwhm) and returns: X,  mask_,  support