code: def test_es_compile():
      search_space = search.SearchSpace(
          n_agents=10,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_es = es.ES()
      new_es.compile(search_space)
  
      try:
          new_es.n_children = "a"
      except:
          new_es.n_children = 0
  
      assert new_es.n_children == 0
  
      try:
          new_es.n_children = -1
      except:
          new_es.n_children = 0
  
      assert new_es.n_children == 0
  
      try:
          new_es.strategy = 1
      except:
          new_es.strategy = np.array([1])
  
      assert new_es.strategy == np.array([1])
  
file_path: opytimizer/tests/opytimizer/optimizers/evolutionary/test_es.py
imports: import numpy
  from opytimizer.optimizers.evolutionary import es
  from opytimizer.spaces import search
label_desc: Use image node_id 3 for calling a global function with example usage: test_es_compile() without return types