I am looking at enabling certain features of mailing lists depending on how many users there are. The following script generates this report with group recursion.

By default it outputs to grouplisting.csv in the same folder you run the script from.