code: public final Node removeFirstOrChildAfter(@Nullable Node prev) {
      checkArgument(prev == null || prev.parent == this, "invalid node.");
      Node target = prev == null ? first : prev.next;
  
      checkNotNull(target, "no next sibling.");
      removeChild(target);
      return target;
    }
docs: Remove the child after the given child, or the first child if given null.