code: def test_nghs_update():
      def square(x):
          return np.sum(x**2)
  
      new_nghs = hs.NGHS()
  
      search_space = search.SearchSpace(
          n_agents=2,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_nghs.update(search_space, square)
  
      assert search_space.agents[0].fit > 0
  
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 17 for calling a global function with example usage: test_nghs_update() and returns: np