code: def test_cem_update():
      def square(x):
          return np.sum(x**2)
  
      new_function = function.Function(pointer=square)
  
      search_space = search.SearchSpace(
          n_agents=10,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_cem = cem.CEM()
      new_cem.compile(search_space)
  
      new_cem.update(search_space, new_function)
  
file_path: opytimizer/tests/opytimizer/optimizers/misc/test_cem.py
imports: import numpy
  from opytimizer.core import function
  from opytimizer.optimizers.misc import cem
  from opytimizer.spaces import search
label_desc: Use image node_id 7 for calling a global function with example usage: test_cem_update() and returns: np