Writing a cython module