And here: this is a pure Python function. No need to put it in a Cython file, that just adds code and slows done compile times.