Implementing Distance-Dependent CRP Mixture Model

The Dirichlet Process Mixture Model tutorial (https://pyro.ai/examples/dirichlet_process_mixture.html) is wonderful. I’m wondering how I would go about changing the Dirichlet Process prior over clusters to a Distance-Dependent Chinese Restaurant Process prior over clusters?