code: def template_clustering(
      path,
      count_clusters,
      chromosome_count,
      population_count,
      count_mutation_gens,
      coeff_mutation_count=0.25,
      select_coeff=1.0,
      fps=15,
      animation=False,
  ):
      sample = read_sample(path)
  
      algo_instance = genetic_algorithm(
          data=sample,
          count_clusters=count_clusters,
          chromosome_count=chromosome_count,
          population_count=population_count,
          count_mutation_gens=count_mutation_gens,
          coeff_mutation_count=coeff_mutation_count,
          select_coeff=select_coeff,
          observer=ga_observer(True, True, True),
      )
  
      start_time = time.time()
  
      algo_instance.process()
  
      print(
          "Sample: ",
          path,
          "\t\tExecution time: ",
          time.time() - start_time,
          "\n",
      )
  
      observer = algo_instance.get_observer()
  
      ga_visualizer.show_clusters(sample, observer)
  
      if animation is True:
          ga_visualizer.animate_cluster_allocation(
              sample,
              observer,
              movie_fps=fps,
              save_movie="clustering_animation.mp4",
          )
  
file_path: pyclustering/pyclustering/cluster/examples/ga_examples.py
imports: from pyclustering.samples.definitions import SIMPLE_SAMPLES
  from pyclustering.cluster.ga import genetic_algorithm, ga_observer, ga_visualizer
  from pyclustering.utils import read_sample
  import time
label_desc: Use image node_id 1 for calling a global function with example usage: template_clustering(path, count_clusters, chromosome_count, population_count, count_mutation_gens, coeff_mutation_count, select_coeff, fps, animation) without return types