code: def _graph_net_data_function(X, w, mask, grad_weight):
      """Compute dot([X; grad_weight * grad], w).
  
      This function is made for the Lasso-like interpretation of the
      Graph-Net.
  
      Parameters
      ----------
      X : ndarray, shape (n_samples, n_features)
          Design matrix.
  
      y : ndarray, shape (n_samples,)
          Target / response vector.
  
      w : ndarray shape (n_features,)
          Unmasked, ravelized weights map.
  
      grad_weight: float
          l1_ratio * alpha.
  
      Returns
      -------
      ndarray, shape (n_features + mask.ndim * n_samples,)
          Data-fit term augmented with design matrix augmented with
          nabla operator (for spatial gradient).
      """
      data_buffer = np.zeros(mask.shape)
      data_buffer[mask] = w
      w_g = grad_weight * gradient(data_buffer)
      out = np.ndarray(X.shape[0] + mask.ndim * X.shape[1])
      out[: X.shape[0]] = X.dot(w)
      out[X.shape[0] :] = np.concatenate(
          tuple(w_g[i][mask] for i in range(mask.ndim))
      )
      return out
  
file_path: nilearn/nilearn/decoding/space_net_solvers.py
imports: from math import sqrt
  import numpy
  from nilearn.masking import unmask_from_to_3d_array
  from ._objective_functions import divergence, gradient, gradient_id, logistic_loss, logistic_loss_grad, logistic_loss_lipschitz_constant, spectral_norm_squared, squared_loss, squared_loss_grad
  from ._proximal_operators import prox_l1, prox_l1_with_intercept, prox_tvl1, prox_tvl1_with_intercept
  from .fista import mfista
label_desc: Use image node_id 3 for calling a global function with example usage: _graph_net_data_function(X, w, mask, grad_weight) and returns: out