code: def _project_shrinkage_thresholding(
      z: ep.Tensor,
      x0: ep.Tensor,
      regularization: float,
      min_: float,
      max_: float,
  ) -> ep.Tensor:
      """Performs the element-wise projected shrinkage-thresholding
      operation"""
  
      upper_mask = z - x0 > regularization
      lower_mask = z - x0 < -regularization
  
      projection = ep.where(
          upper_mask, ep.minimum(z - regularization, max_), x0
      )
      projection = ep.where(
          lower_mask, ep.maximum(z + regularization, min_), projection
      )
  
      return projection
  
file_path: foolbox/foolbox/attacks/ead.py
imports: from typing import Union, Tuple, Any, Optional
  from typing_extensions import Literal
  import math
  import eagerpy
  from ..models import Model
  from ..criteria import Misclassification, TargetedMisclassification
  from ..distances import l1
  from ..devutils import atleast_kd, flatten
  from .base import MinimizationAttack
  from .base import get_criterion
  from .base import T
  from .base import raise_if_kwargs
  from .base import verify_input_bounds
label_desc: Use image node_id 3 for calling a global function with example usage: _project_shrinkage_thresholding(z, x0, regularization, min_, max_) and returns: projection