code: def test_wwo_refract_wave():
      def square(x):
          return np.sum(x**2)
  
      search_space = search.SearchSpace(
          n_agents=50,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_wwo = wwo.WWO()
      new_wwo.compile(search_space)
  
      height, length = new_wwo._refract_wave(
          search_space.agents[0], search_space.best_agent, square, 0
      )
  
      assert height == 5
      assert length != 0
  
file_path: opytimizer/tests/opytimizer/optimizers/science/test_wwo.py
imports: import numpy
  from opytimizer.optimizers.science import wwo
  from opytimizer.spaces import search
label_desc: Use image node_id 5 for calling a global function with example usage: test_wwo_refract_wave() and returns: np