code: def silhoeutte_ksearch(sample, kmin, kmax, allocator, random_state):
      random_state = random_state or -1
      pointer_data = package_builder(sample, c_double).create()
  
      ccore = ccore_library.get()
      ccore.silhouette_ksearch_algorithm.restype = POINTER(
          pyclustering_package
      )
      package = ccore.silhouette_ksearch_algorithm(
          pointer_data,
          c_size_t(kmin),
          c_size_t(kmax),
          c_size_t(allocator),
          c_longlong(random_state),
      )
  
      results = package_extractor(package).extract()
      ccore.free_pyclustering_package(package)
  
      return (
          results[
              silhouette_ksearch_package_indexer.SILHOUETTE_KSEARCH_PACKAGE_INDEX_AMOUNT
          ][0],
          results[
              silhouette_ksearch_package_indexer.SILHOUETTE_KSEARCH_PACKAGE_INDEX_SCORE
          ][0],
          results[
              silhouette_ksearch_package_indexer.SILHOUETTE_KSEARCH_PACKAGE_INDEX_SCORES
          ],
      )
  
imports: from ctypes import c_double, c_longlong, c_size_t, POINTER
  from pyclustering.core.converter import convert_data_type
  from pyclustering.core.wrapper import ccore_library
  from pyclustering.core.pyclustering_package import pyclustering_package, package_builder, package_extractor
label_desc: Use image node_id 2 for calling a global function with example usage: silhoeutte_ksearch(sample, kmin, kmax, allocator, random_state) and returns: results,  results,  results