code: def templateCalculateMatrixDistance(self, data, matrix_expected):
      matrix = utils.calculate_distance_matrix(data)
  
      self.assertEqual(len(matrix), len(matrix_expected))
  
      for i in range(len(matrix)):
          self.assertEqual(len(matrix[i]), len(matrix_expected[i]))
  
          for j in range(len(matrix[i])):
              if numpy.isnan(matrix_expected[i][j]):
                  self.assertTrue(numpy.isnan(matrix[i][j]))
              else:
                  self.assertEqual(matrix[i][j], matrix_expected[i][j])
  
imports: import unittest
  import matplotlib
  import numpy
  from pyclustering.cluster.kmeans import kmeans
  from pyclustering.cluster.center_initializer import kmeans_plusplus_initializer
  import pyclustering.utils
  from pyclustering.utils import euclidean_distance
  from pyclustering.utils import average_neighbor_distance
  from pyclustering.utils import read_sample
  from pyclustering.utils import data_corners
  from pyclustering.utils import norm_vector
  from pyclustering.utils import rgb2gray
  from pyclustering.utils import extract_number_oscillations
  from pyclustering.utils import draw_clusters
  from pyclustering.samples.definitions import SIMPLE_SAMPLES, IMAGE_SIMPLE_SAMPLES
label_desc: Use image node_id 36 for calling the Test obj's underlying member method code with example usage: obj.templateCalculateMatrixDistance(data, matrix_expected) without return types