code: def test_ssd_compile():
      search_space = search.SearchSpace(
          n_agents=10,
          n_variables=2,
          lower_bound=[0, 0],
          upper_bound=[10, 10],
      )
  
      new_ssd = ssd.SSD()
      new_ssd.compile(search_space)
  
      try:
          new_ssd.local_position = 1
      except:
          new_ssd.local_position = np.array([1])
  
      assert new_ssd.local_position == 1
  
      try:
          new_ssd.velocity = 1
      except:
          new_ssd.velocity = np.array([1])
  
      assert new_ssd.velocity == 1
  
file_path: opytimizer/tests/opytimizer/optimizers/social/test_ssd.py
imports: import numpy
  from opytimizer.optimizers.social import ssd
  from opytimizer.spaces import search
  from opytimizer.utils import constant
label_desc: Use image node_id 3 for calling a global function with example usage: test_ssd_compile() without return types