def _inBoundaries(value, bounds):
    """
    Tell if an integer value is within a range.
       
    Parameters
    ----------
    value : int
        A value to be tested.
    bounds : int | tuple(int, int)
        Low boundary of the range, or a tuple of the form (low, high+1).

    Returns
    -------
    boolean
        Whether or not the value fell within the range
    """

    if type(bounds) is tuple:
        assert 2 == len(bounds)
        return bounds[0] <= value < bounds[1]
    else:
        assert type(bounds) is int
        return bounds <= value