code: def calculate_distance_matrix(
      sample, metric=distance_metric(type_metric.EUCLIDEAN)
  ):
      """!
      @brief Calculates distance matrix for data sample (sequence of points) using specified metric (by default Euclidean distance).
  
      @param[in] sample (array_like): Data points that are used for distance calculation.
      @param[in] metric (distance_metric): Metric that is used for distance calculation between two points.
  
      @return (list) Matrix distance between data points.
  
      """
  
      amount_rows = len(sample)
      return [
          [metric(sample[i], sample[j]) for j in range(amount_rows)]
          for i in range(amount_rows)
      ]
  
imports: import time
  import numpy
  from numpy import array
  from PIL import Image
  import matplotlib.pyplot
  from sys import platform
  from pyclustering.utils.metric import distance_metric, type_metric
label_desc: Use image node_id 2 for calling a global function with example usage: calculate_distance_matrix(sample, metric) and returns: unknown