code: def main():
      N, LAMBDA = 30, 1000
      MU = int(LAMBDA / 4)
      strategy = EMNA(
          centroid=[5.0] * N, sigma=5.0, mu=MU, lambda_=LAMBDA
      )
  
      toolbox = base.Toolbox()
      toolbox.register("evaluate", benchmarks.sphere)
      toolbox.register(
          "generate", strategy.generate, creator.Individual
      )
      toolbox.register("update", strategy.update)
  
      # Numpy equality function (operators.eq) between two arrays returns the
      # equality element wise, which raises an exception in the if similar()
      # check of the hall of fame. Using a different equality function like
      # numpy.array_equal or numpy.allclose solve this issue.
      hof = tools.HallOfFame(1, similar=numpy.array_equal)
      stats = tools.Statistics(lambda ind: ind.fitness.values)
      stats.register("avg", numpy.mean)
      stats.register("std", numpy.std)
      stats.register("min", numpy.min)
      stats.register("max", numpy.max)
  
      algorithms.eaGenerateUpdate(
          toolbox, ngen=150, stats=stats, halloffame=hof
      )
  
      return hof[0].fitness.values[0]
  
file_path: deap/examples/eda/emna.py
imports: import random
  import numpy
  from operator import attrgetter
  from deap import algorithms
  from deap import base
  from deap import benchmarks
  from deap import creator
  from deap import tools
label_desc: Use image node_id 1 for calling a global function with example usage: main() and returns: hof