code: public boolean removeNode(String path, boolean removeChildren) throws ZooKeeperException {
          try {
              if (removeChildren) {
                  curatorFramework.delete().deletingChildrenIfNeeded().forPath(path);
              } else {
                  curatorFramework.delete().forPath(path);
              }
          } catch (KeeperException.NotEmptyException e) {
              return false;
          } catch (KeeperException.NoNodeException e) {
              return true;
          } catch (Exception e) {
              if (e instanceof ZooKeeperException) {
                  throw (ZooKeeperException) e;
              } else {
                  throw new ZooKeeperException(e);
              }
          }
          _invalidateCache(path);
          return true;
      }
docs: Removes an existing node.
  
  @param path
  @param removeChildren
  {@code true} to indicate that child nodes should be removed
  too
  @return {@code true} if node has been removed successfully, {@code false}
  otherwise (maybe node is not empty)
  @since 0.4.1
  @throws ZooKeeperException