def check_range(value, a, b, strict=False):
    """Check that a value lies in a given range

    :param value: value to test
    :param a: lower bound
    :param b: upper bound
    :return: nothing

    .. doctest::

        >>> from easydev.tools import check_range
        >>> check_range(1,0, 2)

    """
    if strict is True:
        if value <= a:
            raise ValueError(' {} must be greater (or equal) than {}'.
                format(value, a))
        if value >= b:
            raise ValueError(' {} must be less (or less) than {}'.format(
                value, b))
    elif strict is False:
        if value < a:
            raise ValueError(' {} must be greater than {}'.format(value, a))
        if value > b:
            raise ValueError(' {} must be less than {}'.format(value, b))
