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