code: public static void slimNode(RPNode node) {
          if(node.getRight() != null && node.getLeft() != null) {
              node.getIndices().clear();
          }
  
      }
docs: Prune indices from the given node
  when it's a leaf
  @param node the node to prune