code: def test_hgso_params_setter():
      new_hgso = hgso.HGSO()
  
      try:
          new_hgso.n_clusters = "a"
      except:
          new_hgso.n_clusters = 2
  
      try:
          new_hgso.n_clusters = -1
      except:
          new_hgso.n_clusters = 2
  
      assert new_hgso.n_clusters == 2
  
      try:
          new_hgso.l1 = "b"
      except:
          new_hgso.l1 = 0.0005
  
      try:
          new_hgso.l1 = -1
      except:
          new_hgso.l1 = 0.0005
  
      assert new_hgso.l1 == 0.0005
  
      try:
          new_hgso.l2 = "c"
      except:
          new_hgso.l2 = 100
  
      try:
          new_hgso.l2 = -1
      except:
          new_hgso.l2 = 100
  
      assert new_hgso.l2 == 100
  
      try:
          new_hgso.l3 = "d"
      except:
          new_hgso.l3 = 0.001
  
      try:
          new_hgso.l3 = -1
      except:
          new_hgso.l3 = 0.001
  
      assert new_hgso.l3 == 0.001
  
      try:
          new_hgso.alpha = "e"
      except:
          new_hgso.alpha = 1.0
  
      try:
          new_hgso.alpha = -1
      except:
          new_hgso.alpha = 1.0
  
      assert new_hgso.alpha == 1.0
  
      try:
          new_hgso.beta = "f"
      except:
          new_hgso.beta = 1.0
  
      try:
          new_hgso.beta = -1
      except:
          new_hgso.beta = 1.0
  
      assert new_hgso.beta == 1.0
  
      try:
          new_hgso.K = "g"
      except:
          new_hgso.K = 1.0
  
      try:
          new_hgso.K = -1
      except:
          new_hgso.K = 1.0
  
      assert new_hgso.K == 1.0
  
file_path: opytimizer/tests/opytimizer/optimizers/science/test_hgso.py
imports: import numpy
  from opytimizer.optimizers.science import hgso
  from opytimizer.spaces import search
label_desc: Use image node_id 2 for calling a global function with example usage: test_hgso_params_setter() without return types