'Asynchronously create a ZNode. Takes the same arguments as
:meth:`create`.
:rtype: :class:`~kazoo.interfaces.IAsyncResult`
.. versionadded:: 1.1
The makepath option.'

def create_async(self, path, value='', acl=None, ephemeral=False, sequence=False, makepath=False):

    if ((acl is None) and self.default_acl):
        acl = self.default_acl
    if (not isinstance(path, basestring)):
        raise TypeError('path    must    be    a    string')
    if (acl and (isinstance(acl, ACL) or (not isinstance(acl, (tuple, list))))):
        raise TypeError("acl    must    be    a    tuple/list    of    ACL's")
    if ((value is not None) and (not isinstance(value, bytes))):
        raise TypeError('value    must    be    a    byte    string')
    if (not isinstance(ephemeral, bool)):
        raise TypeError('ephemeral    must    be    a    bool')
    if (not isinstance(sequence, bool)):
        raise TypeError('sequence    must    be    a    bool')
    if (not isinstance(makepath, bool)):
        raise TypeError('makepath    must    be    a    bool')
    flags = 0
    if ephemeral:
        flags |= 1
    if sequence:
        flags |= 2
    if (acl is None):
        acl = OPEN_ACL_UNSAFE
    async_result = self.handler.async_result()
    @capture_exceptions(async_result)
    def do_create():
        result = self._create_async_inner(path, value, acl, flags, trailing=sequence)
        result.rawlink(create_completion)
    @capture_exceptions(async_result)
    def retry_completion(result):
        result.get()
        do_create()
    @wrap(async_result)
    def create_completion(result):
        try:
            return self.unchroot(result.get())
        except NoNodeError:
            if (not makepath):
                raise
            if (sequence and path.endswith('/')):
                parent = path.rstrip('/')
            else:
                (parent, _) = split(path)
            self.ensure_path_async(parent, acl).rawlink(retry_completion)
    do_create()
    return async_result
