code: def test_pso_params_setter():
      new_pso = pso.PSO()
  
      try:
          new_pso.w = "a"
      except:
          new_pso.w = 1
  
      try:
          new_pso.w = -1
      except:
          new_pso.w = 1
  
      assert new_pso.w == 1
  
      try:
          new_pso.c1 = "b"
      except:
          new_pso.c1 = 1.5
  
      try:
          new_pso.c1 = -1
      except:
          new_pso.c1 = 1.5
  
      assert new_pso.c1 == 1.5
  
      try:
          new_pso.c2 = "c"
      except:
          new_pso.c2 = 1.5
  
      try:
          new_pso.c2 = -1
      except:
          new_pso.c2 = 1.5
  
      assert new_pso.c2 == 1.5
  
file_path: opytimizer/tests/opytimizer/optimizers/swarm/test_pso.py
imports: import numpy
  from opytimizer.optimizers.swarm import pso
  from opytimizer.spaces import search
label_desc: Use image node_id 2 for calling a global function with example usage: test_pso_params_setter() without return types