code: def calculate_linkage_matrix(depend_matrix, clust_method):
      from scipy.cluster.hierarchy import linkage
      from scipy.spatial.distance import squareform
  
      dissimilarity = 1 - abs(depend_matrix)
      ## https://www.kaggle.com/sgalella/correlation-heatmaps-with-hierarchical-clustering?scriptVersionId=24045077&cellId=10
      linkage_matrix = linkage(squareform(dissimilarity), clust_method)
  
      return linkage_matrix
  
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 6 for calling a global function with example usage: calculate_linkage_matrix(depend_matrix, clust_method) and returns: linkage_matrix