python reimplementation of mProphet