code: def test_efo_params_setter():
      new_efo = efo.EFO()
  
      try:
          new_efo.positive_field = "a"
      except:
          new_efo.positive_field = 0.5
  
      try:
          new_efo.positive_field = -1
      except:
          new_efo.positive_field = 0.5
  
      assert new_efo.positive_field == 0.5
  
      try:
          new_efo.negative_field = "b"
      except:
          new_efo.negative_field = 0.2
  
      try:
          new_efo.negative_field = 0.99
      except:
          new_efo.negative_field = 0.2
  
      try:
          new_efo.negative_field = -1
      except:
          new_efo.negative_field = 0.2
  
      assert new_efo.negative_field == 0.2
  
      try:
          new_efo.ps_ratio = "c"
      except:
          new_efo.ps_ratio = 0.25
  
      try:
          new_efo.ps_ratio = -1
      except:
          new_efo.ps_ratio = 0.25
  
      assert new_efo.ps_ratio == 0.25
  
      try:
          new_efo.r_ratio = "d"
      except:
          new_efo.r_ratio = 0.25
  
      try:
          new_efo.r_ratio = -1
      except:
          new_efo.r_ratio = 0.25
  
      assert new_efo.r_ratio == 0.25
  
      try:
          new_efo.phi = "e"
      except:
          new_efo.phi = (1 + np.sqrt(5)) / 2
  
      assert new_efo.phi == (1 + np.sqrt(5)) / 2
  
      try:
          new_efo.RI = "f"
      except:
          new_efo.RI = 0
  
      try:
          new_efo.RI = -1
      except:
          new_efo.RI = 0
  
      assert new_efo.RI == 0
  
imports: import numpy
  from opytimizer.optimizers.science import efo
  from opytimizer.spaces import search
label_desc: Use image node_id 2 for calling a global function with example usage: test_efo_params_setter() without return types