code: def templateClusterAllocationOneDimensionData(ccore_flag):
      input_data = (
          [[random()] for _ in range(10)]
          + [[random() + 3] for _ in range(10)]
          + [[random() + 5] for _ in range(10)]
          + [[random() + 8] for _ in range(10)]
      )
  
      kmedoids_instance = kmedoids(
          input_data, [5, 15, 25, 35], 0.025, ccore_flag
      )
      kmedoids_instance.process()
      clusters = kmedoids_instance.get_clusters()
  
      assertion.eq(4, len(clusters))
      for cluster in clusters:
          assertion.eq(10, len(cluster))
  
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 3 for calling the kmedoids_test_template obj's underlying member method code with example usage: obj.templateClusterAllocationOneDimensionData(ccore_flag) without return types