human
Complete this python program:
def expect_bounded(__funcname=_qualified_name, **named):
assistant
#Here is the Python program you requested.

    """Preprocessing decorator verifying that inputs fall INCLUSIVELY between
    bounds.
    Bounds should be passed as a pair of ``(min_value, max_value)``.
    ``None`` may be passed as ``min_value`` or ``max_value`` to signify that
    the input is only bounded above or below.
    Examples
    >>> @expect_bounded(x=(1, 5))
    ... def foo(x):
    ...    return x + 1
    >>> foo(1)
    2
    >>> foo(5)
    6
    >>> foo(6)  # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
    Traceback (most recent call last):
    ValueError: ...foo() expected a value inclusively between 1 and 5 for
    argument \x\, but got 6 instead.
    >>> @expect_bounded(x=(2, None))
    ... def foo(x):
    ...    return x
    >>> foo(100000)
    100000
    >>> foo(1)  # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
    Traceback (most recent call last):
    ValueError: ...foo() expected a value greater than or equal to 2 for
    argument \x\, but got 1 instead.
    >>> @expect_bounded(x=(None, 5))
    ... def foo(x):
    ...    return x
    >>> foo(6)  # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
    Traceback (most recent call last):
    ValueError: ...foo() expected a value less than or equal to 5 for
    argument \x\, but got 6 instead.
    """
    def _make_bounded_check(bounds):
        (lower, upper) = bounds
        if (lower is None):
            def should_fail(value):
                return (value > upper)
            predicate_descr = ('less    than    or    equal    to    ' + str(upper))
        elif (upper is None):
            def should_fail(value):
                return (value < lower)
            predicate_descr = ('greater    than    or    equal    to    ' + str(lower))
        else:
            def should_fail(value):
                return (not (lower <= value <= upper))
            predicate_descr = ('inclusively    between    %s    and    %s' % bounds)
        template = "%(funcname)s()    expected    a    value    {predicate}    for    argument    '%(argname)s',    but    got    %(actual)s    instead.".format(predicate=predicate_descr)
        return make_check(exc_type=ValueError, template=template, pred=should_fail, actual=repr, funcname=__funcname)
    return _expect_bounded(_make_bounded_check, __funcname=__funcname, **named)