code: def find_optimal_amout_clusters(sample_path, kmin, kmax, algorithm):
      sample = read_sample(sample_path)
      search_instance = silhouette_ksearch(
          sample, kmin, kmax, algorithm=algorithm
      ).process()
  
      amount = search_instance.get_amount()
      scores = search_instance.get_scores()
  
      print("Sample: '%s', Scores: '%s'" % (sample_path, str(scores)))
  
      initial_centers = kmeans_plusplus_initializer(
          sample, amount
      ).initialize()
      kmeans_instance = kmeans(sample, initial_centers).process()
  
      clusters = kmeans_instance.get_clusters()
  
      visualizer = cluster_visualizer()
      visualizer.append_clusters(clusters, sample)
      visualizer.show()
  
imports: from pyclustering.cluster import cluster_visualizer
  from pyclustering.cluster.center_initializer import kmeans_plusplus_initializer
  from pyclustering.cluster.kmeans import kmeans
  from pyclustering.cluster.silhouette import silhouette_ksearch_type, silhouette_ksearch
  from pyclustering.samples.definitions import SIMPLE_SAMPLES, FCPS_SAMPLES
  from pyclustering.utils import read_sample
label_desc: Use image node_id 1 for calling a global function with example usage: find_optimal_amout_clusters(sample_path, kmin, kmax, algorithm) without return types