Wraps the function with a decorator that runs all of the
    pre/post conditions.

def check(f):
    """
    Wraps the function with a decorator that runs all of the
    pre/post conditions.
    """
    if hasattr(f, 'wrapped_fn'):
        return f
    else:
        @wraps(f)
        def decorated(*args, **kwargs):
            return check_conditions(f, args, kwargs)
        decorated.wrapped_fn = f
        return decorated