code: def template_clustering(
      number_clusters,
      path,
      branching_factor=50,
      max_node_entries=100,
      initial_diameter=0.5,
      type_measurement=measurement_type.CENTROID_EUCLIDEAN_DISTANCE,
      entry_size_limit=200,
      diameter_multiplier=1.5,
      show_result=True,
  ):
      print("Sample: ", path)
  
      sample = read_sample(path)
  
      birch_instance = birch(
          sample,
          number_clusters,
          branching_factor,
          max_node_entries,
          initial_diameter,
          type_measurement,
          entry_size_limit,
          diameter_multiplier,
      )
      birch_instance.process()
      clusters = birch_instance.get_clusters()
  
      if show_result is True:
          visualizer = cluster_visualizer()
          visualizer.append_clusters(clusters, sample)
          visualizer.show()
  
      return sample, clusters
  
imports: from pyclustering.cluster import cluster_visualizer
  from pyclustering.cluster.birch import birch
  from pyclustering.container.cftree import measurement_type
  from pyclustering.utils import read_sample
  from pyclustering.samples.definitions import SIMPLE_SAMPLES, FCPS_SAMPLES
label_desc: Use image node_id 1 for calling a global function with example usage: template_clustering(number_clusters, path, branching_factor, max_node_entries, initial_diameter, type_measurement, entry_size_limit, diameter_multiplier, show_result) and returns: sample,  clusters