public static <T> void writeSeq(@NotNull DataOutput out,
                                  @NotNull Collection<? extends T> collection,
                                  @SuppressWarnings("BoundedWildcard")
                                  @NotNull ThrowableConsumer<T, IOException> writeElement) throws IOException {
    writeINT(out, collection.size());
    for (T t : collection) {
      writeElement.consume(t);
    }
  }
public static <T> void writeSeq(@NotNull DataOutput out,
                                  @NotNull Collection<? extends T> collection,
                                  @SuppressWarnings("BoundedWildcard")
                                  @NotNull ThrowableConsumer<T, IOException> writeElement)