def group_table(groups):

    group_dict = {}
    for group in groups:
        _count_apps(group, group_dict)

    fields = OrderedDict([
        ('ID', lambda g: g[0]['id']),
        ('APPS', lambda g: g[1]),
    ])

    tb = table(fields, group_dict.values(), sortby="ID")
    tb.align['ID'] = 'l'

    return tb
Migrate `invoiced` bool field into `invoice_status` text field.
dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/tables.py/group_table--crossover with--dataset/ETHPy150Open swcarpentry/amy/workshops/migrations/0040_invoice_status.py/migrate_invoiced