python implementation of generalized suffix tree