code: def check(self, value, major):
          
          if self._min is not None and value < self._min:
              raise ValueError("Integer %d is lower than minimum %d."
                               % (value, self._min))
          if self._max is not None and value > self._max:
              raise ValueError("Integer %d is higher than maximum %d."
                               % (value, self._max))
docs: Check whether the value is between the minimum and maximum.
  
          Raise a ValueError if it is not.