pub fn to_pykey_err(e: impl Display) -> PyErr
Converts any type that implements Display to a Python KeyError.
Display
KeyError
Returns a Python error with the error string.