Ancenstral sampling

Didn’t know the name ancestral sampling before. It is just sampling p(x,y,z) as p(x) p(y|x) p(z|x,y). Or basically, it is just a special case of Gibbs sampling.