pub fn extract_list<T>( ob: &Bound<'_, PyAny>, attr_name: &str, context: &str, ) -> PyResult<Vec<T>>where T: for<'a> FromPyObject<'a>,
Generic function for extracting lists of items with error handling.