public List<SpanNode> removeChildren(int i) {
        Children retval = childTrees.remove(i);
        ensureAtLeastOneSubTree();
        resetCachedFromAndTo();
        if (retval != null) {
            retval.setInvalid();
            retval.setParent(null);
            for (SpanNode node : retval.children()) {
                node.setParent(null);
            }
            return retval.children();
        }
        return null;
    }
Removes the subtree at index i (both the subtree itself and its contents, which become invalidated).
Note that if this AlternateSpanList has only one subtree and index 0 is given,
a new empty subtree is automatically added, since an AlternateSpanList always has at least one subtree.

@param i the index of the subtree to remove
@return the subtree removed, if any (note: invalidated)
document/src/main/java/com/yahoo/document/annotation/AlternateSpanList.java