code: def _parse(self, threshold):
          
          match = re.search(r'^(@?)((~|\d*):)?(\d*)$', threshold)
  
          if not match:
              raise ValueError('Error parsing Threshold: {0}'.format(threshold))
  
          if match.group(1) == '@':
              self._inclusive = True
  
          if match.group(3) == '~':
              self._min = float('-inf')
          elif match.group(3):
              self._min = float(match.group(3))
          else:
              self._min = float(0)
  
          if match.group(4):
              self._max = float(match.group(4))
          else:
              self._max = float('inf')
  
          if self._max < self._min:
              raise ValueError('max must be superior to min')
docs: internal threshold string parser
  
          arguments:
              threshold: string describing the threshold