code: def test_qsa_update():
      def square(x):
          return np.sum(x**2)
  
      search_space = search.SearchSpace(
          n_agents=100,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_qsa = qsa.QSA()
  
      new_qsa.update(search_space, square, 1, 10)
  
file_path: opytimizer/tests/opytimizer/optimizers/social/test_qsa.py
imports: import numpy
  from opytimizer.optimizers.social import qsa
  from opytimizer.spaces import search
  from opytimizer.utils import constant
label_desc: Use image node_id 5 for calling a global function with example usage: test_qsa_update() and returns: np