code: def random_state(kmin, kmax, algorithm, random_state, ccore_flag):
      sample = read_sample(SIMPLE_SAMPLES.SAMPLE_SIMPLE4)
  
      ksearch_instance_1 = silhouette_ksearch(
          sample,
          kmin,
          kmax,
          algorithm=algorithm,
          random_state=random_state,
          ccore=ccore_flag,
      ).process()
  
      ksearch_instance_2 = silhouette_ksearch(
          sample,
          kmin,
          kmax,
          algorithm=algorithm,
          random_state=random_state,
          ccore=ccore_flag,
      ).process()
  
      assertion.eq(
          ksearch_instance_1.get_amount(),
          ksearch_instance_2.get_amount(),
      )
      assertion.eq(
          ksearch_instance_1.get_score(), ksearch_instance_2.get_score()
      )
      assertion.eq(
          len(ksearch_instance_1.get_scores()),
          len(ksearch_instance_2.get_scores()),
      )
  
      scores1 = ksearch_instance_1.get_scores()
      scores2 = ksearch_instance_2.get_scores()
      for key in scores1:
          key = int(key)
          if math.isnan(scores1[key]) and math.isnan(scores2[key]):
              continue
          else:
              assertion.eq(scores1[key], scores2[key])
  
file_path: pyclustering/pyclustering/cluster/tests/silhouette_templates.py
imports: import math
  from pyclustering.cluster.silhouette import silhouette, silhouette_ksearch
  from pyclustering.samples import answer_reader
  from pyclustering.samples.definitions import SIMPLE_SAMPLES
  from pyclustering.tests.assertion import assertion
  from pyclustering.utils import read_sample, calculate_distance_matrix, distance_metric, type_metric
label_desc: Use image node_id 4 for calling the silhouette_test_template obj's underlying member method code with example usage: obj.random_state(kmin, kmax, algorithm, random_state, ccore_flag) without return types