code: def template_clustering(
      path_sample,
      eps,
      minpts,
      amount_clusters=None,
      visualize=True,
      ccore=False,
  ):
      sample = read_sample(path_sample)
  
      optics_instance = optics(
          sample, eps, minpts, amount_clusters, ccore
      )
      (ticks, _) = timedcall(optics_instance.process)
  
      print(
          "Sample: ", path_sample, "\t\tExecution time: ", ticks, "\n"
      )
  
      if visualize is True:
          clusters = optics_instance.get_clusters()
          noise = optics_instance.get_noise()
  
          visualizer = cluster_visualizer()
          visualizer.append_clusters(clusters, sample)
          visualizer.append_cluster(noise, sample, marker="x")
          visualizer.show()
  
          ordering = optics_instance.get_ordering()
          analyser = ordering_analyser(ordering)
  
          ordering_visualizer.show_ordering_diagram(
              analyser, amount_clusters
          )
  
imports: import random
  from pyclustering.cluster import cluster_visualizer
  from pyclustering.cluster.optics import optics, ordering_analyser, ordering_visualizer
  from pyclustering.utils import read_sample, timedcall
  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(path_sample, eps, minpts, amount_clusters, visualize, ccore) without return types