code: def templateClusterAllocationTheSameObjects(
      number_objects, number_clusters, ccore_flag=False
  ):
      value = random()
      input_data = [[value]] * number_objects
  
      initial_medoids = []
      step = int(math.floor(number_objects / number_clusters))
      for i in range(number_clusters):
          initial_medoids.append(i * step)
  
      kmedoids_instance = kmedoids(
          input_data, initial_medoids, ccore=ccore_flag
      )
      kmedoids_instance.process()
      clusters = kmedoids_instance.get_clusters()
      medoids = kmedoids_instance.get_medoids()
  
      assertion.eq(len(clusters), len(medoids))
      assertion.eq(len(set(medoids)), len(medoids))
  
      object_mark = [False] * number_objects
      allocated_number_objects = 0
  
      for cluster in clusters:
          for index_object in cluster:
              assertion.eq(
                  False, object_mark[index_object]
              )  # one object can be in only one cluster.
  
              object_mark[index_object] = True
              allocated_number_objects += 1
  
      assertion.eq(number_objects, allocated_number_objects)
  
file_path: pyclustering/pyclustering/cluster/tests/kmedoids_templates.py
imports: import math
  import numpy
  from pyclustering.tests.assertion import assertion
  from pyclustering.cluster.kmedoids import kmedoids, build
  from pyclustering.cluster.center_initializer import kmeans_plusplus_initializer
  from pyclustering.samples import answer_reader
  from pyclustering.utils import read_sample, calculate_distance_matrix
  from pyclustering.utils.metric import distance_metric, type_metric
  from random import random, randint
label_desc: Use image node_id 5 for calling the kmedoids_test_template obj's underlying member method code with example usage: obj.templateClusterAllocationTheSameObjects(number_objects, number_clusters, ccore_flag) without return types