public static DataConverter toDataConverter(LogicalType logicalType) {
        return logicalType.accept(new LogicalTypeToDataConverter());
    }
@Test
    void testLogicalTypeToDataConverter() {
        PythonTypeUtils.DataConverter converter = PythonTypeUtils.toDataConverter(new IntType());

        GenericRowData data = new GenericRowData(1);
        data.setField(0, 10);
        Object externalData = converter.toExternal(data, 0);
        assertThat(externalData).isInstanceOf(Long.class);
        assertThat(externalData).isEqualTo(10L);
    }