code: def test_bpso_compile():
      boolean_space = boolean.BooleanSpace(n_agents=2, n_variables=5)
  
      new_bpso = bpso.BPSO()
      new_bpso.compile(boolean_space)
  
      try:
          new_bpso.local_position = 1
      except:
          new_bpso.local_position = np.array([1])
  
      assert new_bpso.local_position == 1
  
      try:
          new_bpso.velocity = 1
      except:
          new_bpso.velocity = np.array([1])
  
      assert new_bpso.velocity == 1
  
file_path: opytimizer/tests/opytimizer/optimizers/boolean/test_bpso.py
imports: import sys
  import numpy
  import opytimizer.math.random
  from opytimizer.core import function
  from opytimizer.optimizers.boolean import bpso
  from opytimizer.spaces import boolean
label_desc: Use image node_id 3 for calling a global function with example usage: test_bpso_compile() without return types