add python code for testing inStateProb