pub fn get_required_parsed<T, F>( dict: &Bound<'_, PyDict>, key: &str, parser: F, ) -> PyResult<T>where F: FnOnce(String) -> Result<T, String>,
Extracts and parses a required value from a Python dictionary.
Returns the parsed value or a PyErr if the key is missing, extraction fails, or parsing fails.
PyErr
Returns PyErr if the key is missing, value extraction fails, or parsing fails.