pub fn extract_required_attr<'py, T>( ob: &Bound<'py, PyAny>, attr_name: &str, context: &str, ) -> PyResult<T>where T: FromPyObject<'py>,
Extract a required attribute with enhanced error messaging