code: def templateClusterAllocationOneDimensionData(ccore):
      input_data = (
          [[random()] for i in range(10)]
          + [[random() + 3] for i in range(10)]
          + [[random() + 5] for i in range(10)]
          + [[random() + 8] for i in range(10)]
      )
  
      kmedians_instance = kmedians(
          input_data, [[0.0], [3.0], [5.0], [8.0]], 0.025, ccore
      )
      kmedians_instance.process()
      clusters = kmedians_instance.get_clusters()
  
      assert len(clusters) == 4
      for cluster in clusters:
          assert len(cluster) == 10
  
file_path: pyclustering/pyclustering/cluster/tests/kmedians_templates.py
imports: from pyclustering.tests.assertion import assertion
  from pyclustering.cluster.kmedians import kmedians
  from pyclustering.utils import read_sample, distance_metric, type_metric
  from random import random
  import numpy
label_desc: Use image node_id 2 for calling the KmediansTestTemplates obj's underlying member method code with example usage: obj.templateClusterAllocationOneDimensionData(ccore) without return types