Checks if value belongs to the interval [inf - dist, sup + dist].

def interval_condition(value, inf, sup, dist):
    """Checks if value belongs to the interval [inf - dist, sup + dist].
    """
    return (value > inf - dist and value < sup + dist)