@PublicEvolving
    public static <IN, OUT> TypeInformation<OUT> getFlatMapReturnTypes(
            FlatMapFunction<IN, OUT> flatMapInterface, TypeInformation<IN> inType) {
        return getFlatMapReturnTypes(flatMapInterface, inType, null, false);
    }
@SuppressWarnings({"unchecked", "rawtypes"})
    @Test
    void testTypeErasure() {
        TypeInformation<?> ti =
                TypeExtractor.getFlatMapReturnTypes(
                        new DummyFlatMapFunction<String, Integer, String, Boolean>(),
                        TypeInformation.of(new TypeHint<Tuple2<String, Integer>>() {}),
                        "name",
                        true);
        assertThat(ti).isInstanceOf(MissingTypeInfo.class);

        assertThatThrownBy(
                        () ->
                                TypeExtractor.getFlatMapReturnTypes(
                                        new DummyFlatMapFunction<
                                                String, Integer, String, Boolean>(),
                                        TypeInformation.of(
                                                new TypeHint<Tuple2<String, Integer>>() {})))
                .isInstanceOf(InvalidTypesException.class);
    }