(message)
return decorator
raise_if_none("message") is a decorator that turns a function that returns a WrappedNode
    whose xml can possibly be None to a function that always returns a valid WrappedNode or raises
    an XFormException with the message given
raise_if_none("message") is a decorator that turns a function that returns a WrappedNode
    whose xml can possibly be None to a function that always returns a valid WrappedNode or raises
    an XFormException with the message given
raise_if_none ( message ) is a decorator that turns a function that returns a WrappedNode whose xml can possibly be None to a function that always returns a valid WrappedNode or raises an XFormException with the message given
def raise_if_none(message):
    """
    raise_if_none("message") is a decorator that turns a function that returns a WrappedNode
    whose xml can possibly be None to a function that always returns a valid WrappedNode or raises
    an XFormException with the message given

    """
    def decorator(fn):
        def _fn(*args, **kwargs):
            n = fn(*args, **kwargs)
            if not n.exists():
                raise XFormException(message)
            else:
                return n
        return _fn
    return decorator
def raise_if_none ( message ) : def decorator ( fn ) : def _fn ( * args , * * kwargs ) : n = fn ( * args , * * kwargs ) if not n . exists ( ) : raise XFormException ( message ) else : return n return _fn return decorator