pub fn arr_to_py(array: Box<dyn Array>) -> PyResult<PyObject> {
    //let series = series.rechunk();
    //let array = series.to_arrow(0);
    Python::with_gil(|py| {
        let pyarrow = py.import_bound("pyarrow")?;
        let pyarrow_array = to_py_array(py, &pyarrow, array)?;
        let polars = py.import_bound("polars")?;
        let out = polars.call_method1("from_arrow", (pyarrow_array,))?;
        Ok(out.to_object(py))
    })
}
<https://github.com/pola-rs/polars/blob/master/examples/python_rust_compiled_function/src/ffi.rs>
src/python/src/lib.rs