Stability of the nonlinear filter for slowly switching Markov chains