code: def disasters_sim(early_mean=early_mean,
                    late_mean=late_mean,
                    switchpoint=switchpoint):
      
      return concatenate((pm.rpoisson(early_mean, size=switchpoint), pm.rpoisson(
          late_mean, size=n - switchpoint)))
docs: Coal mining disasters sampled from the posterior predictive distribution