code: def cutoff_contributions_old(dataframe, max_contrib):
      """
      The function cutoff_contributions computes a mask on a sorted contribution matrix.
      It outputs True everywhere the contribution is in the top-k,
      k being defined as an option by the user.
  
      Parameters
      ----------
      df : pd.Dataframe
          DataFrame is a sorted local contributions matrix.
      max_contrib: int
          The k most important contributions to keep.
  
      Returns
      -------
      pd.Dataframe
          Mask indicating where contributions should be considered.
      """
      mask = np.full_like(dataframe, False).astype(bool)
      mask[:, :max_contrib] = True
      return pd.DataFrame(
          mask, columns=dataframe.columns, index=dataframe.index
      )
  
file_path: shapash/shapash/manipulation/filters.py
imports: import numpy
  import pandas
label_desc: Use image node_id 4 for calling a global function with example usage: cutoff_contributions_old(dataframe, max_contrib) and returns: pd