code: private void tryDeleteEmptyParentZNodes() throws Exception {
  		// try to delete the parent znodes if they are empty
  		String remainingPath = getParentPath(getNormalizedPath(client.getNamespace()));
  		final CuratorFramework nonNamespaceClient = client.usingNamespace(null);
  
  		while (!isRootPath(remainingPath)) {
  			try {
  				nonNamespaceClient.delete().forPath(remainingPath);
  			} catch (KeeperException.NotEmptyException ignored) {
  				// We can only delete empty znodes
  				break;
  			}
  
  			remainingPath = getParentPath(remainingPath);
  		}
  	}
docs: Tries to delete empty parent znodes.
  
  <p>IMPORTANT: This method can be removed once all supported ZooKeeper versions
  support the container {@link org.apache.zookeeper.CreateMode}.
  
  @throws Exception if the deletion fails for other reason than {@link KeeperException.NotEmptyException}