Predictions on holdout dataset with beta binomial regression

How can I modify your suggestion if instead of using just one global intercept now I want to use random intercepts?
p_mu = pm.math.invlogit(random_intercept[tt.cast(test_site, ‘int64’)] + beta_position * test_position)

I guess I can reuse the code you sent me when predicting for an existing site. But I am not sure how to modify it when I need to predict on a new site. I was trying to modify the code from here How do we predict on new unseen groups in a hierarchical model in PyMC3? but I am not sure how to do it for this case since I also need access to the parameter p and not just to the number of successes.

Thanks a lot in advance and sorry for the trivial questions, I am just starting out.