code: def test_kh_compile():
      search_space = search.SearchSpace(
          n_agents=5,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_kh = kh.KH()
      new_kh.compile(search_space)
  
      try:
          new_kh.motion = 1
      except:
          new_kh.motion = np.array([1])
  
      assert new_kh.motion == np.array([1])
  
      try:
          new_kh.foraging = 1
      except:
          new_kh.foraging = np.array([1])
  
      assert new_kh.foraging == np.array([1])
  
imports: import numpy
  from opytimizer.optimizers.swarm import kh
  from opytimizer.spaces import search
label_desc: Use image node_id 3 for calling a global function with example usage: test_kh_compile() without return types