@DaniloJRezende I know!
But it is such a simple and beautiful "trick" that I'd expect it cannot be so easily used for real with huge models.
Rejection sampling TL;DR: you want to sample ~mu on interval I, but you can only evaluate mu pointwise.
Sample X,Y uniform on I x [0, M], for any M greater than sup(mu(I)), and reject until Y≤mu(X), you now have X,Y uniform under mu's graph, and X~mu !