'Recursively create a path asynchronously if it doesn\'t
exist. Takes the same arguments as :meth:`ensure_path`.
:rtype: :class:`~kazoo.interfaces.IAsyncResult`
.. versionadded:: 1.1'

def ensure_path_async(self, path, acl=None):

    acl = (acl or self.default_acl)
    async_result = self.handler.async_result()
    @wrap(async_result)
    def create_completion(result):
        try:
            return result.get()
        except NodeExistsError:
            return True
    @capture_exceptions(async_result)
    def prepare_completion(next_path, result):
        result.get()
        self.create_async(next_path, acl=acl).rawlink(create_completion)
    @wrap(async_result)
    def exists_completion(path, result):
        if result.get():
            return True
        (parent, node) = split(path)
        if node:
            self.ensure_path_async(parent, acl=acl).rawlink(partial(prepare_completion, path))
        else:
            self.create_async(path, acl=acl).rawlink(create_completion)
    self.exists_async(path).rawlink(partial(exists_completion, path))
    return async_result
