code: def unsupervised_opf_clustering(opytimizer):
      # Gathers parameters from Opytimizer
      # Pay extremely attention to their order when declaring due to their bounds
      max_k = int(opytimizer[0][0])
  
      # Creates an UnsupervisedOPF instance
      opf = UnsupervisedOPF(
          max_k=max_k,
          distance="log_squared_euclidean",
          pre_computed_distance=None,
      )
  
      # Fits training data into the classifier
      opf.fit(X_train, Y_train)
  
      # If data is labeled, one can propagate predicted labels instead of only the cluster identifiers
      opf.propagate_labels()
  
      # Predicts new data
      preds, _ = opf.predict(X_test)
  
      # Calculates accuracy
      acc = g.opf_accuracy(Y_test, preds)
  
      return 1 - acc
  
file_path: opytimizer/examples/integrations/opfython/unsupervised_opf_clustering.py
imports: import opfython.math.general
  import opfython.stream.splitter
  from opfython.models.unsupervised import UnsupervisedOPF
  from sklearn.datasets import load_digits
  from opytimizer import Opytimizer
  from opytimizer.core import Function
  from opytimizer.optimizers.swarm import PSO
  from opytimizer.spaces import SearchSpace
label_desc: Use image node_id 1 for calling a global function with example usage: unsupervised_opf_clustering(opytimizer) and returns: unknown