code: def clean(self, value):
          
          if not isinstance(value, self.t):
              value = self.t(value)
  
          if not self.allow_negative and value < 0:
              raise ValueError('value was negative')
  
          if not self.allow_positive and value > 0:
              raise ValueError('values was positive')
  
          return value
docs: clean a value, converting and performing bounds checking