@throws_when_stopped
    def delete(self, path, recursive=False):
        # Removing the root is not allowed
        assert not path == "/"

        node = self._find(path)
        if node is None:
            return NotEmptyException("%s not empty" % path)
        if node.children and not recursive:
            raise
        node.parent.remove_child(node.name)
        self._notify_children_watches(str(node.parent))
Delete a znode and optionally recursively delete its children.
dataset/ETHPy150Open pinterest/kingpin/kingpin/tests/kazoo_utils/mock_kazoo_client.py/MockKazooClient.delete