def make_certifier():
def decorator(func):<EOL><INDENT>@six.wraps(func)<EOL>def wrapper(value=_undefined, **kwargs):<EOL><INDENT>def certify(val):<EOL><INDENT>if is_enabled():<EOL><INDENT>exec_func(func, val, **kwargs)<EOL>return val<EOL><DEDENT><DEDENT>if value is not _undefined:<EOL><INDENT>return certify(value)<EOL><DEDENT>else:<EOL><INDENT>return certify<EOL><DEDENT><DEDENT>return wrapper<EOL><DEDENT>return decorator<EOL>
Decorator that can wrap raw functions to create a certifier function.

Certifier functions support partial application.  If a function wrapped by
`make_certifier` is called with a value as its first argument it will be
certified immediately.  If no value is passed, then it will return a
function that can be called at a later time.

Assuming that `certify_something` has been decorated by `make_certifier`:
    >>> certify_something(value, foo=1, bar=2)

Is equivalent to:
    >>> certifier = certify_something(foo=1, bar=2)
    >>> certifier(value)