A viterbi decoding implementation in python