code: def test_es_params_setter():
      new_es = es.ES()
  
      try:
          new_es.child_ratio = "a"
      except:
          new_es.child_ratio = 0.5
  
      try:
          new_es.child_ratio = -1
      except:
          new_es.child_ratio = 0.5
  
      assert new_es.child_ratio == 0.5
  
file_path: opytimizer/tests/opytimizer/optimizers/evolutionary/test_es.py
imports: import numpy
  from opytimizer.optimizers.evolutionary import es
  from opytimizer.spaces import search
label_desc: Use image node_id 2 for calling a global function with example usage: test_es_params_setter() without return types