private void assertSortedById(@NotNull List<? extends ChildInfo> children) {
    for (int i = 1; i < children.size(); i++) {
      ChildInfo info = children.get(i);
      if (info.getId() < children.get(i - 1).getId()) {
        throw new IllegalArgumentException("Unsorted list: " + this);
      }
    }
  }
private void assertSortedById(@NotNull List<? extends ChildInfo> children)