You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: ffi.rs
    path of file: ./repos/polars/crates/polars-arrow/src/array/list
    
    the code of the file until where you have to start completion: use polars_error::PolarsResult;

use super::super::ffi::ToFfi;
use super::super::Array;
use super::ListArray;
us
    
    unsafe fn try_from_ffi(array: A) -> PolarsResult<Self> {
        let data_type = array.data_type().clone();
        let validity = unsafe { array.validity() }?;
        let offsets = unsafe { array.buffer::<O>(1) }?;
        let child = unsafe { array.child(0)? };
        let values = ffi::try_from(child)?;

        // assumption that data from FFI is well constructed
        let offsets = unsafe { OffsetsBuffer::new_unchecked(offsets) };

        Self::try_new(data_type, offsets, values, validity)
    }