def value_in_range(rule, value):
    """ Checks if a value is in range of a given tuple.

    :param rule: [(a, b), (c, d)]
    :param value: value
    :return: boolean
    """
    return value in range(rule[0][0], rule[0][1] + 1) or \
           value in range(rule[1][0], rule[1][1] + 1)