code: def test_sfo_update():
      def square(x):
          return np.sum(x**2)
  
      search_space = search.SearchSpace(
          n_agents=10,
          n_variables=5,
          lower_bound=[0, 0, 0, 0, 0],
          upper_bound=[10, 10, 10, 10, 10],
      )
  
      new_sfo = sfo.SFO()
      new_sfo.compile(search_space)
  
      new_sfo.update(search_space, square, 1)
  
      new_sfo.A = 1
      new_sfo.update(search_space, square, 350)
  
file_path: opytimizer/tests/opytimizer/optimizers/swarm/test_sfo.py
imports: import numpy
  from opytimizer.optimizers.swarm import sfo
  from opytimizer.spaces import search
label_desc: Use image node_id 7 for calling a global function with example usage: test_sfo_update() and returns: np