Hidden markov model python. We assume that the outputs are generated by hidden states.