Stata code to perform i) restricted randomisation in a cluster-randomized controlled trial and ii) check for bias in final randomisation scheme.