code: def test_sghs_update():
      def square(x):
          return np.sum(x**2)
  
      search_space = search.SearchSpace(
          n_agents=2,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_sghs = hs.SGHS()
      new_sghs.compile(search_space)
  
      new_sghs.update(search_space, square, 1, 10)
      new_sghs.update(search_space, square, 6, 10)
  
      new_sghs.lp = 1
      new_sghs.LP = 1
  
      new_sghs.update(search_space, square, 1, 10)
  
imports: import numpy
  from opytimizer.core import function
  from opytimizer.optimizers.evolutionary import hs
  from opytimizer.spaces import search
  from opytimizer.utils import constant
label_desc: Use image node_id 13 for calling a global function with example usage: test_sghs_update() and returns: np