code: def compute_sorted_variables_interactions_list_indices(
      interaction_values,
  ):
      """
      Returns the sorted interactions as a list of pairs of indices.
      Computes the (absolute) sum of all contributions of each pair of variables in a 2D matrix.
      Then returns the list of all unique pairs of indices of the sorted values in descending order.
  
      Parameters
      ----------
      interaction_values : np.ndarray
          Numpy array of shape (# samples x # features x # features) containing all interactions for each sample.
  
  
      Returns
      -------
      interaction_contrib_sorted_indices : list
          List containing all pairs of indices in descending order of most important interactions.
      """
      tmp = np.abs(interaction_values).sum(0)
      for i in range(tmp.shape[0]):
          tmp[i, i:] = 0
  
      interaction_contrib_sorted_indices = np.dstack(
          np.unravel_index(
              np.argsort(tmp.ravel(), kind="stable"), tmp.shape
          )
      )[0][::-1]
      return interaction_contrib_sorted_indices
  
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 10 for calling a global function with example usage: compute_sorted_variables_interactions_list_indices(interaction_values) and returns: interaction_contrib_sorted_indices