code: def _evalFunction(
      func,
      individual,
      name_values,
      verbose=0,
      error_score="raise",
      args={},
  ):
      parameters = _individual_to_params(individual, name_values)
      score = 0
  
      _parameters = dict(parameters)
      _parameters.update(args)
      if error_score == "raise":
          score = func(**_parameters)
      else:
          try:
              score = func(**_parameters)
          except Exception:
              score = error_score
  
      return (score,)
  
file_path: sklearn-deap/evolutionary_search/optimize.py
imports: import numpy
  from deap import base, creator, tools, algorithms
  from sklearn.model_selection._search import _check_param_grid
  from .cv import _get_param_types_maxint, _initIndividual, _cxIndividual, _mutIndividual, _individual_to_params
  import warnings
  import os
label_desc: Use image node_id 1 for calling a global function with example usage: _evalFunction(func, individual, name_values, verbose, error_score, args) and returns: score