code: def _tvl1_objective_from_gradient(gradient):
      """Compute TV-l1 objective function from gradient.
  
      Parameters
      ----------
      gradient: ndarray, shape (4, nx, ny, nz)
         precomputed "gradient + id" array
  
      Returns
      -------
      float
          Value of TV-L1 penalty.
      """
      tv_term = np.sum(
          np.sqrt(np.sum(gradient[:-1] * gradient[:-1], axis=0))
      )
      l1_term = np.abs(gradient[-1]).sum()
      return l1_term + tv_term
  
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 11 for calling a global function with example usage: _tvl1_objective_from_gradient(gradient) and returns: unknown