def get_subset(values, lower=None, upper=None):
    """Returns subset of values greater or equal `lower` and smaller `upper`.

    Args:
        values (iterable): Iterable of numeric values.
        lower (number, default None): Lower bound (including) to filter values.
        upper (number, default None): Upper bound (excluding) to filter values.
    """
    if lower is None and upper is not None:
        subset = filter(lambda v: v < upper, values)
    elif lower is not None and upper is None:
        subset = filter(lambda v: v >= lower, values)
    elif lower is not None and upper is not None:
        subset = filter(lambda v: v >= lower and v < upper, values)
    else:
        subset = values
    return list(subset)
