['# Priors\n    alpha = pm.Normal(\'alpha\', mu=0, sd=10)\n    beta = pm.Normal(\'beta\', mu=0, sd=10)\n    sigma = pm.HalfNormal(\'sigma\', sd=10)\n    \n    # Likelihood\n    mu = alpha + beta * year\n    likelihood = pm.Poisson(\'likelihood\', mu=mu, observed=N)\n    \n    # Sampling\n    trace = pm.sample(1000, tune=1000, chains=4, return_inferencedata=True, idata_kwargs={"log_likelihood": True})\n\n# Plot the posterior distributions\naz.plot_trace(trace)\nplt.show()\n\naz.summary(trace, round_to=2)\naz.plot_posterior(trace)\nplt.show()\n\n# Calculate the posterior predictive checks\nwith trace:\n    ppc = pm.sample_posterior_predictive(trace, samples=500)\n\n# Plot the posterior predictive checks\nplt.figure(figsize=(10, 6))\nplt.scatter(year, C, color=\'blue\', label=\'Data\')\nplt.plot(year, ppc[\'likelihood\'].mean(axis=0), color=\'red\', label=\'Posterior Predictive Mean\')\nplt.fill_between(year, ppc[\'likelihood\'].quantile(0.025, axis=0), ppc[\'likelihood\'].quantile(0.975, axis=0), color=\'red\', alpha=0.3, label=\'95% Credible Interval\')\nplt.xlabel(\'Year\')\nplt']