pub fn extract_struct_field_with<'a, 'py, T>( extractor: fn(_: &'a Bound<'py, PyAny>) -> PyResult<T>, obj: &'a Bound<'py, PyAny>, struct_name: &str, field_name: &str, ) -> PyResult<T>