@staticmethod
def _check_range(value, minimum, maximum):
    """
        Raise an IndexError if `value` is out of the given range.

        :param value: Value to check
        :param minimum: Minimum value (inclusive)
        :param maximum: Maximum value (inclusive)
        :type value: int
        :type minimum: int
        :type maximum: int

        """
    if value < minimum or value > maximum:
        raise IndexError('Value %r out of range [%r, %r]' % (value, minimum,
            maximum))
