code: def testClusterAllocationSample2NumpyArrayUserDefined(self):
      metric = distance_metric(
          type_metric.USER_DEFINED,
          func=distance_metric(type_metric.EUCLIDEAN_SQUARE),
      )
      input_data = numpy.array(
          read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE2)
      )
      initial_centers = numpy.array([[3.5, 4.8], [6.9, 7], [7.5, 0.5]])
      KmediansTestTemplates.templateLengthProcessData(
          input_data, initial_centers, [10, 5, 8], True, metric=metric
      )
  
imports: import unittest
  import numpy
  import matplotlib
  from pyclustering.cluster.tests.kmedians_templates import KmediansTestTemplates
  from pyclustering.cluster.kmedians import kmedians
  from pyclustering.samples.definitions import SIMPLE_SAMPLES
  from pyclustering.core.tests import remove_library
  from pyclustering.utils import read_sample
  from pyclustering.utils.metric import type_metric, distance_metric
label_desc: Use image node_id 16 for calling the KmediansIntegrationTest obj's underlying member method code with example usage: obj.testClusterAllocationSample2NumpyArrayUserDefined() without return types