code: def test_bso_params_setter():
      new_bso = bso.BSO()
  
      try:
          new_bso.m = "a"
      except:
          new_bso.m = 5
  
      assert new_bso.m == 5
  
      try:
          new_bso.m = -1
      except:
          new_bso.m = 5
  
      assert new_bso.m == 5
  
      try:
          new_bso.p_replacement_cluster = "b"
      except:
          new_bso.p_replacement_cluster = 0.2
  
      assert new_bso.p_replacement_cluster == 0.2
  
      try:
          new_bso.p_replacement_cluster = -1
      except:
          new_bso.p_replacement_cluster = 0.2
  
      assert new_bso.p_replacement_cluster == 0.2
  
      try:
          new_bso.p_single_cluster = "c"
      except:
          new_bso.p_single_cluster = 0.8
  
      assert new_bso.p_single_cluster == 0.8
  
      try:
          new_bso.p_single_cluster = -1
      except:
          new_bso.p_single_cluster = 0.8
  
      assert new_bso.p_single_cluster == 0.8
  
      try:
          new_bso.p_single_best = "d"
      except:
          new_bso.p_single_best = 0.4
  
      assert new_bso.p_single_best == 0.4
  
      try:
          new_bso.p_single_best = -1
      except:
          new_bso.p_single_best = 0.4
  
      assert new_bso.p_single_best == 0.4
  
      try:
          new_bso.p_double_best = "e"
      except:
          new_bso.p_double_best = 0.5
  
      assert new_bso.p_double_best == 0.5
  
      try:
          new_bso.p_double_best = -1
      except:
          new_bso.p_double_best = 0.5
  
      assert new_bso.p_double_best == 0.5
  
      try:
          new_bso.k = "f"
      except:
          new_bso.k = 20
  
      assert new_bso.k == 20
  
      try:
          new_bso.k = -1
      except:
          new_bso.k = 20
  
      assert new_bso.k == 20
  
file_path: opytimizer/tests/opytimizer/optimizers/social/test_bso.py
imports: import numpy
  from opytimizer.optimizers.social import bso
  from opytimizer.spaces import search
label_desc: Use image node_id 2 for calling a global function with example usage: test_bso_params_setter() without return types