in src/py.rs [157:162]
fn py_decode_bytes(&self, py: Python, tokens: Vec<Rank>) -> Result<Py<PyBytes>, PyErr> {
match py.allow_threads(|| self.decode_bytes(&tokens)) {
Ok(bytes) => Ok(PyBytes::new_bound(py, &bytes).into()),
Err(e) => Err(pyo3::exceptions::PyKeyError::new_err(format!("{}", e))),
}
}