A module to simulate and sample from a Hierarchical Dirichlet Process