How to get the ELBO samples and log of joint probability?

Dear Stan helpers,

How do we get the ELBO values when using the vb function in Stan?
For example, we set the desired output number of ELBO samples to 1000, but we are not sure where to extract these samples?

fit = stan_model.vb(data=data, elbo_samples=1000)

Also, we understand that we can get the log posterior, using ‘lp__’ from fit[‘sampler_params’][1], is this correct?

Is there a way to get the log p(z,x) (log of the joint probability)?

Than you.

[edit] using pystan, please.

if you’re OK with Python, check out CmdStanPy - specifically -

Thank you. If possible, we would like to use pystan vb function.
We do not see where to get the ELBO samples? Could you please let us know? thank you.