code: def test_sma_params_setter():
      new_sma = sma.SMA()
  
      try:
          new_sma.z = "a"
      except:
          new_sma.z = 0.05
  
      try:
          new_sma.z = -1
      except:
          new_sma.z = 0.05
  
      assert new_sma.z == 0.05
  
file_path: opytimizer/tests/opytimizer/optimizers/science/test_sma.py
imports: import numpy
  from opytimizer.optimizers.science import sma
  from opytimizer.spaces import search
label_desc: Use image node_id 2 for calling a global function with example usage: test_sma_params_setter() without return types