code: def templateClusterAllocationTheSameObjects(
      number_objects, number_clusters, ccore_flag
  ):
      value = random()
      input_data = [[value]] * number_objects
  
      initial_centers = []
      for i in range(number_clusters):
          initial_centers.append([random()])
  
      kmedians_instance = kmedians(
          input_data, initial_centers, ccore=ccore_flag
      )
      kmedians_instance.process()
      clusters = kmedians_instance.get_clusters()
  
      object_mark = [False] * number_objects
      allocated_number_objects = 0
  
      for cluster in clusters:
          for index_object in cluster:
              assert (
                  object_mark[index_object] is False
              )  # one object can be in only one cluster.
  
              object_mark[index_object] = True
              allocated_number_objects += 1
  
      assert number_objects == allocated_number_objects
  
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 3 for calling the KmediansTestTemplates obj's underlying member method code with example usage: obj.templateClusterAllocationTheSameObjects(number_objects, number_clusters, ccore_flag) without return types