@NotNull
  public static Collector<@Nullable PyType, ?, @Nullable PyType> toUnion() {
    return Collectors.collectingAndThen(Collectors.toList(), PyUnionType::union);
  }
@NotNull
  public static Collector<@Nullable PyType, ?, @Nullable PyType> toUnion()