code: 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
      --------
      >>> @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
      )
  
imports: from datetime import tzinfo
  from functools import partial
  from operator import attrgetter
  from numpy import dtype
  import pandas
  from pytz import timezone
  from six import iteritems, string_types, PY3
  from toolz import valmap, complement, compose
  import toolz.curried.operator
  from zipline.utils.compat import wraps
  from zipline.utils.functional import getattrs
  from zipline.utils.preprocess import call, preprocess
label_desc: Use image node_id 13 for calling a global function with example usage: expect_bounded(__funcname) and returns: _expect_bounded, make_check, unknown, unknown, unknown