Mixed effects model - Posterior distribution of random effects on hold-out individuals

In a word, what I’d like to do is:

  1. Estimate posterior distribution of fixed (and random) effects in a standard mixed effect model → OK
  2. Only keep the posterior distribution of fixed effects of my model (i.e. consider them as learnt once for all)
  3. Estimate posterior distribution of (“new”) random effects (= on never seen data, of never seen groups), having the distribution of fixed effects as an input

In a linear mixed effects, with ML point estimation, this can be done easily (there’s even a closed formula for part 3, i.e. estimation of “new” random effects, fixed effects being kept fixed), but here in a Bayesian setting with pymc3 I can’t figure out how I should proceed.

I feel my question is close to the one asked in this other post Predicting on hold-out data for different groups in a hierarchical model that was also left without any answer.

Any thoughts / help on this ? I’d really be grateful, thanks !