public SpanList remove(SpanNode node) {
        boolean removed = children().remove(node);
        if (removed) {
            node.setParent(null);
            resetCachedFromAndTo();
            node.setInvalid();
        }
        return this;
    }
Removes and invalidates the given SpanNode from this.

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