code: def prox_l1(y, alpha, copy=True):
      """Compute proximity operator for L1 norm."""
      shrink = np.zeros(y.shape)
      if copy:
          y = y.copy()
      y_nz = y.nonzero()
      shrink[y_nz] = np.maximum(1 - alpha / np.abs(y[y_nz]), 0)
      y *= shrink
      return y
  
file_path: nilearn/nilearn/decoding/_proximal_operators.py
imports: from math import sqrt
  import numpy
  from ._objective_functions import divergence_id, gradient_id, tv_l1_from_gradient
label_desc: Use image node_id 1 for calling a global function with example usage: prox_l1(y, alpha, copy) and returns: y