<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check(self, value, major):
 """Check whether the value is between the minimum and maximum. Raise a ValueError if it is not. """

        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))