public SpanList remove(int i) {
        SpanNode node = children().remove(i);
        if (node != null) {
            node.setParent(null);
            node.setInvalid();
        }
        return this;
    }
Removes and invalidates the SpanNode at the given index from this.

@param i the index of the node to remove.
@return this, for chaining.
document/src/main/java/com/yahoo/document/annotation/SpanList.java