code: def supervised_opf_feature_selection(opytimizer):
      # Gathers features
      features = opytimizer[:, 0].astype(bool)
  
      # Remaking training and validation subgraphs with selected features
      X_train_selected = X_train[:, features]
      X_val_selected = X_val[:, features]
  
      # Creates a SupervisedOPF instance
      opf = SupervisedOPF(
          distance="log_squared_euclidean", pre_computed_distance=None
      )
  
      # Fits training data into the classifier
      opf.fit(X_train_selected, Y_train)
  
      # Predicts new data
      preds = opf.predict(X_val_selected)
  
      # Calculates accuracy
      acc = g.opf_accuracy(Y_val, preds)
  
      return 1 - acc
  
file_path: opytimizer/examples/integrations/opfython/supervised_opf_feature_selection.py
imports: import opfython.math.general
  import opfython.stream.splitter
  from opfython.models.supervised import SupervisedOPF
  from sklearn.datasets import load_digits
  import opytimizer.math.random
  from opytimizer import Opytimizer
  from opytimizer.core import Function
  from opytimizer.optimizers.boolean import BPSO
  from opytimizer.spaces import BooleanSpace
label_desc: Use image node_id 1 for calling a global function with example usage: supervised_opf_feature_selection(opytimizer) and returns: unknown