pub fn rust_series_to_py_series(series: &Series) -> PyResult<PyObject> {
    // ensure we have a single chunk
    let series = series.rechunk();
    let array = series.to_arrow(0, false);

    Python::with_gil(|py| {
        // import pyarrow
        let pyarrow = py.import_bound("pyarrow")?;

        // pyarrow array
        let pyarrow_array = to_py_array(py, &pyarrow, array)?;

        // import polars
        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