Asymptotic stability in the distribution of nonlinear stochastic systems with semi-Markovian switching