code: def templateClusterAllocationOneDimensionData(ccore_flag):
      input_data = (
          [[0.0] for _ in range(10)]
          + [[5.0] for _ in range(10)]
          + [[10.0] for _ in range(10)]
          + [[15.0] for _ in range(10)]
      )
  
      xmeans_instance = xmeans(
          input_data,
          [[0.5], [5.5], [10.5], [15.5]],
          20,
          0.025,
          splitting_type.BAYESIAN_INFORMATION_CRITERION,
          ccore_flag,
      )
      xmeans_instance.process()
  
      clusters = xmeans_instance.get_clusters()
      centers = xmeans_instance.get_centers()
  
      assertion.eq(len(clusters), 4)
      assertion.eq(len(centers), len(clusters))
  
      assertion.le(len(clusters), 20)
      for cluster in clusters:
          assertion.eq(len(cluster), 10)
  
file_path: pyclustering/pyclustering/cluster/tests/xmeans_templates.py
imports: import numpy
  import random
  from pyclustering.cluster.xmeans import xmeans, splitting_type
  from pyclustering.cluster.center_initializer import random_center_initializer
  from pyclustering.samples.definitions import SIMPLE_SAMPLES
  from pyclustering.utils import read_sample, distance_metric, type_metric
  from pyclustering.tests.assertion import assertion
label_desc: Use image node_id 3 for calling the XmeansTestTemplates obj's underlying member method code with example usage: obj.templateClusterAllocationOneDimensionData(ccore_flag) without return types