code: def get_dendrogram_aspects_ordered(
      hierarchical_clustering_dendrogram, depend_matrix
  ):
      # names of variables on axis
      tick_dict = dict(
          zip(
              hierarchical_clustering_dendrogram.layout.yaxis.tickvals,
              [
                  [var]
                  for var in hierarchical_clustering_dendrogram.layout.yaxis.ticktext
              ],
          )
      )
      d = {
          k: v for v, k in enumerate(depend_matrix.columns)
      }  # original order of columns
  
      # get names of variables for dendrogram traces
      _aspects_dendrogram_order = []
      for scatter in hierarchical_clustering_dendrogram.data:
          vars_list = tick_dict[scatter.y[1]] + tick_dict[scatter.y[2]]
          vars_list.sort(key=d.get)
          tick_dict[np.mean(scatter.y[1:3])] = vars_list
          _aspects_dendrogram_order.append(vars_list)
  
      # get min dependency between grouped variables
      _vars_min_depend, _min_depend = get_min_depend_from_matrix(
          depend_matrix, _aspects_dendrogram_order
      )
  
      return pd.DataFrame(
          {
              "variable_names": _aspects_dendrogram_order,
              "min_depend": _min_depend,
              "vars_min_depend": _vars_min_depend,
          }
      )
  
file_path: DALEX/python/dalex/dalex/aspect/utils.py
imports: import numpy
  import pandas
  import warnings
  from .None import checks
  from ..None import _global_checks
label_desc: Use image node_id 7 for calling a global function with example usage: get_dendrogram_aspects_ordered(hierarchical_clustering_dendrogram, depend_matrix) and returns: pd