code: def test_bsa_compile():
      search_space = search.SearchSpace(
          n_agents=10,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_bsa = bsa.BSA()
      new_bsa.compile(search_space)
  
      try:
          new_bsa.old_agents = 1
      except:
          new_bsa.old_agents = []
  
      assert new_bsa.old_agents == []
  
file_path: opytimizer/tests/opytimizer/optimizers/evolutionary/test_bsa.py
imports: import numpy
  from opytimizer.optimizers.evolutionary import bsa
  from opytimizer.spaces import search
label_desc: Use image node_id 3 for calling a global function with example usage: test_bsa_compile() without return types