Subword complex: auxiliary Cython functions