code: def cluster_distances(path_sample, amount_clusters):
      distances = [
          "euclidian",
          "manhattan",
          "avr-inter",
          "avr-intra",
          "variance",
      ]
  
      sample = utils.read_sample(path_sample)
  
      agglomerative_instance = agglomerative(sample, amount_clusters)
      agglomerative_instance.process()
  
      obtained_clusters = agglomerative_instance.get_clusters()
  
      print("Measurements for:", path_sample)
  
      for index_cluster in range(len(obtained_clusters)):
          for index_neighbor in range(
              index_cluster + 1, len(obtained_clusters), 1
          ):
              cluster1 = obtained_clusters[index_cluster]
              cluster2 = obtained_clusters[index_neighbor]
  
              center_cluster1 = utils.centroid(sample, cluster1)
              center_cluster2 = utils.centroid(sample, cluster2)
  
              for index_distance_type in range(len(distances)):
                  distance = None
                  distance_type = distances[index_distance_type]
  
                  if distance_type == "euclidian":
                      distance = utils.euclidean_distance(
                          center_cluster1, center_cluster2
                      )
  
                  elif distance_type == "manhattan":
                      distance = utils.manhattan_distance(
                          center_cluster1, center_cluster2
                      )
  
                  elif distance_type == "avr-inter":
                      distance = utils.average_inter_cluster_distance(
                          cluster1, cluster2, sample
                      )
  
                  elif distance_type == "avr-intra":
                      distance = utils.average_intra_cluster_distance(
                          cluster1, cluster2, sample
                      )
  
                  elif distance_type == "variance":
                      distance = utils.variance_increase_distance(
                          cluster1, cluster2, sample
                      )
  
              print(
                  "\tDistance",
                  distance_type,
                  "from",
                  index_cluster,
                  "to",
                  index_neighbor,
                  "is:",
                  distance,
              )
  
file_path: pyclustering/pyclustering/utils/examples/utils_examples.py
imports: import pyclustering.tests
  from pyclustering.cluster.agglomerative import agglomerative
  from pyclustering.samples.definitions import SIMPLE_SAMPLES
  import matplotlib.pyplot
label_desc: Use image node_id 1 for calling a global function with example usage: cluster_distances(path_sample, amount_clusters) without return types