code: private void removeNode(TreeNode treeNode) {
          removeNodeFromIndex(treeNode.getQueryNode());
          TreeNode parentNode = getParentTreeNode(treeNode);
          if (parentNode != null) {
              accessChildrenRelation(parentNode).removeChild(treeNode);
          }
          parentIndex.remove(treeNode);
  
          /**
           * Its children have no parent anymore
           */
          for (TreeNode childTreeNode : childrenIndex.get(treeNode).getChildren()) {
              parentIndex.remove(childTreeNode);
          }
          childrenIndex.remove(treeNode);
      }
docs: Low-level