code: def test_hgso_compile():
      search_space = search.SearchSpace(
          n_agents=10,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_hgso = hgso.HGSO()
      new_hgso.compile(search_space)
  
      try:
          new_hgso.coefficient = 1
      except:
          new_hgso.coefficient = np.array([1])
  
      assert new_hgso.coefficient == np.array([1])
  
      try:
          new_hgso.pressure = 1
      except:
          new_hgso.pressure = np.array([1])
  
      assert new_hgso.pressure == np.array([1])
  
      try:
          new_hgso.constant = 1
      except:
          new_hgso.constant = np.array([1])
  
      assert new_hgso.constant == np.array([1])
  
file_path: opytimizer/tests/opytimizer/optimizers/science/test_hgso.py
imports: import numpy
  from opytimizer.optimizers.science import hgso
  from opytimizer.spaces import search
label_desc: Use image node_id 3 for calling a global function with example usage: test_hgso_compile() without return types