pub fn adapt_err_value<E>(err: &E) -> PyErrwhere
    E: Error + ?Sized,