code: def testCalculateMetric(self):
      assertion.eq(
          1.0,
          metric.distance_metric(metric.type_metric.EUCLIDEAN)(
              [0.0, 1.0], [0.0, 0.0]
          ),
      )
      assertion.eq(
          4.0,
          metric.distance_metric(metric.type_metric.EUCLIDEAN_SQUARE)(
              [2.0, 2.0], [4.0, 2.0]
          ),
      )
      assertion.eq(
          4.0,
          metric.distance_metric(metric.type_metric.MANHATTAN)(
              [1.0, 1.0], [-1.0, -1.0]
          ),
      )
      assertion.eq(
          2.0,
          metric.distance_metric(metric.type_metric.CHEBYSHEV)(
              [2.0, -2.0], [0.0, 0.0]
          ),
      )
      assertion.eq(
          2.0,
          metric.distance_metric(metric.type_metric.MINKOWSKI)(
              [-3.0, -3.0], [-5.0, -3.0]
          ),
      )
      assertion.eq(
          2.0,
          metric.distance_metric(
              metric.type_metric.MINKOWSKI, degree=2
          )([-3.0, -3.0], [-5.0, -3.0]),
      )
      assertion.eq(
          0.5,
          metric.distance_metric(
              metric.type_metric.GOWER, max_range=([2.0, 0.0])
          )([-3.0, -3.0], [-5.0, -3.0]),
      )
      assertion.eq(
          0.5,
          metric.distance_metric(
              metric.type_metric.GOWER,
              data=[
                  [-3.0, -3.0],
                  [-4.0, -3.0],
                  [-4.5, -3.0],
                  [-5.0, -3.0],
              ],
          )([-3.0, -3.0], [-5.0, -3.0]),
      )
      assertion.eq(
          4.0,
          metric.distance_metric(
              metric.type_metric.USER_DEFINED,
              func=metric.euclidean_distance_square,
          )([2.0, 2.0], [4.0, 2.0]),
      )
  
      user_function = lambda point1, point2: point1[0] + point2[0] + 2
      assertion.eq(
          5.0,
          metric.distance_metric(
              metric.type_metric.USER_DEFINED, func=user_function
          )([2.0, 3.0], [1.0, 3.0]),
      )
  
file_path: pyclustering/pyclustering/utils/tests/unit/ut_metric.py
imports: import unittest
  import matplotlib
  import numpy
  from pyclustering.tests.assertion import assertion
  import pyclustering.utils.metric
label_desc: Use image node_id 1 for calling the MetricUnitTest obj's underlying member method code with example usage: obj.testCalculateMetric() without return types