code: def cutoff_contributions(mask, k=10):
      """
      Compute a mask that select for each raw the top-k True,
      k being defined as an option by the user.
  
      Parameters
      ----------
      mask : pd.Dataframe
          Boolean DataFrame indicating sorted contribution we want to hide/show.
      k: int (default: 10)
          The number of top feature we want to show.
  
      Returns
      -------
      pd.Dataframe
          Mask where only the k-top contributions are considered.
      """
      return (
          mask.replace(False, np.nan)
          .cumsum(axis=1)
          .isin(range(1, k + 1))
      )
  
file_path: shapash/shapash/manipulation/filters.py
imports: import numpy
  import pandas
label_desc: Use image node_id 5 for calling a global function with example usage: cutoff_contributions(mask, k) and returns: mask