code: def test_optimizer_evaluate():
      def square(x):
          return np.sum(x**2)
  
      new_function = function.Function(square)
      new_search_space = search.SearchSpace(
          n_agents=1,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_optimizer = optimizer.Optimizer()
      new_optimizer.evaluate(new_search_space, new_function)
  
      assert new_search_space.best_agent.fit < sys.float_info.max
  
file_path: opytimizer/tests/opytimizer/core/test_optimizer.py
imports: import sys
  import numpy
  from opytimizer.core import function, optimizer
  from opytimizer.spaces import search
label_desc: Use image node_id 10 for calling a global function with example usage: test_optimizer_evaluate() and returns: np