code: def _limit_value(value, upper=1.0, lower=0.0):
      
      if value > upper:
          return(upper)
      if value < lower:
          return(lower)
      return value
docs: Returs value (such as amplitude) to upper and lower value
  
      >>> _limit_value(0.5)
      0.5
  
      >>> _limit_value(1.5)
      1.0
  
      >>> _limit_value(-1.5)
      0.0