public static TypeSerializer toInternalSerializer(LogicalType logicalType) {
        return logicalType.accept(new LogicalTypetoInternalSerializerConverter());
    }
@Test
    void testUnsupportedTypeSerializer() {
        LogicalType logicalType =
                new UnresolvedUserDefinedType(UnresolvedIdentifier.of("cat", "db", "MyType"));
        String expectedTestException =
                "Python UDF doesn't support logical type `cat`.`db`.`MyType` currently.";
        assertThatThrownBy(() -> PythonTypeUtils.toInternalSerializer(logicalType))
                .hasStackTraceContaining(expectedTestException);
    }