Using a random variable as observed

Any chance someone could create a gist with a simple implementation of what @jonsedar has done? I am struggling to replicate without knowing what mdl is, where to import compute_log_likelihood_for_potential, etc.

FWIW - my use case here is the Holsten-Laubach-Williams model in economics. In Equation 4, the “observed” \tilde{y} is a function of another latent variable, y^*. My model worked in pymc3 but I’ve so far been unable to port to pymc5.