code: def model(opt):
      feature_indices = get_feature_indices(opt)
      if len(feature_indices) == 0:
          return 0
  
      feature_idx_list = [
          idx for idx in feature_indices if idx is not None
      ]
      x_new = X[:, feature_idx_list]
  
      knr = KNeighborsRegressor(n_neighbors=opt["n_neighbors"])
      scores = cross_val_score(knr, x_new, y, cv=5)
      score = scores.mean()
  
      return score
  
file_path: Hyperactive/examples/optimization_applications/feature_selection.py
imports: import numpy
  import itertools
  from sklearn.datasets import load_diabetes
  from sklearn.model_selection import cross_val_score
  from sklearn.neighbors import KNeighborsRegressor
  from hyperactive import Hyperactive
  from hyperactive.optimizers import EvolutionStrategyOptimizer
label_desc: Use image node_id 2 for calling a global function with example usage: model(opt) and returns: score, int