Cython code snippet