code: def create_dist_matrix(dataset, dist_func, **kwargs):
      distance_mat = np.zeros((len(dataset), len(dataset)))
      for i, j in itertools.product(
          range(len(dataset)), range(len(dataset))
      ):
          distance_mat[i, j] = dist_func(
              dataset[i], dataset[j], **kwargs
          )
      return distance_mat
  
file_path: pyts/examples/clustering/plot_dtw_boss.py
imports: import itertools
  import numpy
  import matplotlib.pyplot
  from scipy.spatial.distance import euclidean
  from scipy.cluster.hierarchy import dendrogram
  from sklearn.metrics import homogeneity_score
  from sklearn.cluster import AgglomerativeClustering
  from pyts.metrics import dtw, boss
  from pyts.transformation import BOSS
  from pyts.datasets import make_cylinder_bell_funnel
label_desc: Use image node_id 1 for calling a global function with example usage: create_dist_matrix(dataset, dist_func) and returns: distance_mat