code: def clip_signed_saliency(
      saliency: np.ndarray, fraction=0.01
  ) -> np.ndarray:
      """Clips top and bottom parts if a signed saliency map."""
      b_value = np.quantile(saliency, fraction / 2, method="higher")
      t_value = np.quantile(saliency, 1 - fraction / 2, method="lower")
      return np.clip(saliency, min(0, b_value), max(0, t_value))
  
file_path: lit/lit_nlp/lib/image_utils.py
imports: import base64
  import io
  from typing import Optional
  import matplotlib.cm
  import numpy
  from PIL import Image
  from PIL import ImageEnhance
label_desc: Use image node_id 6 for calling a global function with example usage: clip_signed_saliency(saliency, fraction) and returns: np