['μ = pm.Normal(\'μ\', mu=0, sigma=10)\n    σ = pm.HalfNormal(\'σ\', sigma=10)\n    λ = pm.Deterministic(\'λ\', pm.math.exp(μ))\n    \n    # Define the Poisson likelihood\n    likelihood = pm.Poisson(\'likelihood\', mu=λ, observed=y)\n    \n    # Sample from the posterior\n    trace = pm.sample(1000, tune=1000, chains=4, return_inferencedata=True, idata_kwargs={"log_likelihood": True})\n\n# Visualize the posterior distributions\naz.plot_posterior(trace, var_names=[\'μ\', \'σ\'], hdi_prob=0.95);\naz.plot_posterior(trace, var_names=[\'λ\'], hdi_prob=0.95);\n\n# Plot the observed data against the posterior predictive distribution\nwith trace:\n    pm.plot_posterior_predictive_glm(trace, pm.Poisson, samples=100, labels=[\'Posterior Predictive\'], alpha=0.5);\n    plt.plot(x, y, \'o\', label=\'Observed Data\');\nplt.legend();\nplt.show();\n\n']