'Delete a node.
The call will succeed if such a node exists, and the given
version matches the node\'s version (if the given version is -1,
the default, it matches any node\'s versions).
This operation, if successful, will trigger all the watches on
the node of the given path left by `exists` API calls, and the
watches on the parent node left by `get_children` API calls.
:param path: Path of node to delete.
:param version: Version of node to delete, or -1 for any.
:param recursive: Recursively delete node and all its children,
defaults to False.
:type recursive: bool
:raises:
:exc:`~kazoo.exceptions.BadVersionError` if version doesn\'t
match.
:exc:`~kazoo.exceptions.NoNodeError` if the node doesn\'t
exist.
:exc:`~kazoo.exceptions.NotEmptyError` if the node has
children.
:exc:`~kazoo.exceptions.ZookeeperError` if the server
returns a non-zero error code.'

def delete(self, path, version=(-1), recursive=False):

    if (not isinstance(recursive, bool)):
        raise TypeError('recursive    must    be    a    bool')
    if recursive:
        return self._delete_recursive(path)
    else:
        return self.delete_async(path, version).get()
