code: def get_feature_indices(opt):
      feature_indices = []
      for key in opt.keys():
          if "feature" not in key:
              continue
          if opt[key] == 0:
              continue
  
          nth_feature = int(key.rsplit(".", 1)[1])
          feature_indices.append(nth_feature)
  
      return feature_indices
  
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 1 for calling a global function with example usage: get_feature_indices(opt) and returns: feature_indices