@PublicEvolving
    public static <IN, OUT> TypeInformation<OUT> getMapReturnTypes(
            MapFunction<IN, OUT> mapInterface, TypeInformation<IN> inType) {
        return getMapReturnTypes(mapInterface, inType, null, false);
    }
@Test
    void testFunctionDependingOnInputWithTupleInputWithTypeMismatch() {
        IdentityMapper2<Boolean> function = new IdentityMapper2<Boolean>();

        TypeInformation<Tuple2<Boolean, String>> inputType =
                new TupleTypeInfo<Tuple2<Boolean, String>>(
                        BasicTypeInfo.BOOLEAN_TYPE_INFO, BasicTypeInfo.INT_TYPE_INFO);

        // input is: Tuple2<Boolean, Integer>
        // allowed: Tuple2<?, String>

        assertThatThrownBy(() -> TypeExtractor.getMapReturnTypes(function, inputType))
                .isInstanceOf(InvalidTypesException.class);
    }