<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def expect_bounded(__funcname=_qualified_name, **named):
 """ 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 -------- 2 6 Traceback (most recent call last):
 argument 'x', but got 6 instead. 100000 Traceback (most recent call last):
 argument 'x', but got 1 instead. Traceback (most recent call last):
 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)