For simplicity of code, we assume that the observation sequence obs is non-empty and that trans_p and emit_p is defined for all states i,j.
为了简化代码，我们假设观察序列 obs 非空且 trans_p 和 emit_p 对所有状态 i,j 有定义。