pub fn extraction_error(context: &str, details: &str) -> PyErr
Helper function to create standardized error messages for failed extractions.