PyMC v5.10.3 prediction stuff

Thank you, Riccardo. I tried to correct the code like this:

with model:
    pm.set_data({"control_data":z_test})
    idata.extend(pm.sample_posterior_predictive(idata,  var_names=["y_hat", "mu"]))

but I obtained the following error:

KeyError: ‘mu’

If I leave only y_hat, the code runs normally and I am able to extract the values, but if I add ‘mu’, it goes into error. ‘Mu’ is correctly present in the model above:

mu = pm.Deterministic("contributions", tt.stack(contributions).T, dims=['all_vars'])

How can I solve this issue?
Thank you!