pub fn gen_pyo3_error_converter(error: &ErrorDef, core_import: &str) -> StringExpand description
Generate a to_py_err converter function that maps each Rust error variant to a Python exception.
Uses Error-suffixed names for variant exceptions (N818 compliance).
When error.methods is non-empty, the constructor receives a tuple
(message, status_code, is_transient, error_type) so that the #[getter]
impl generated by gen_pyo3_error_methods_impl can read them back.