def check_intervals(I_s, I_b):
    """
    check if the interval I_s is within I_b
    """
    smaller, bigger = I_s
    if smaller >= I_b[0] and bigger <= I_b[1]:
        return True
    else:
        return False