code: def compute_top_correlations_features(
      corr: pd.DataFrame, max_features: int
  ) -> list:
      """
      Returns the max_features features having top correlations.
  
      Parameters
      ----------
      corr: pd.DataFrame
      max_features : int
  
      Returns
      -------
      list
      """
      sorted_corr = (
          corr.abs().unstack().sort_values(kind="quicksort")[::-1]
      )
      set_features = set()
      i = 0
      while len(set_features) < max_features and i < len(sorted_corr):
          if sorted_corr.index[i][0] != sorted_corr.index[i][1]:
              set_features.add(sorted_corr.index[i][0])
              # Last iteration can add one more feature otherwise
              if len(set_features) != max_features:
                  set_features.add(sorted_corr.index[i][1])
          i += 1
      return list(set_features)
  
file_path: shapash/shapash/utils/utils.py
imports: import numpy
  import pandas
  import socket
  import math
  from shapash.explainer.smart_state import SmartState
  from shapash.explainer.multi_decorator import MultiDecorator
label_desc: Use image node_id 12 for calling a global function with example usage: compute_top_correlations_features(corr, max_features) and returns: list