def show_groups(): groups_data = Agent.get_all_groups(limit=None) print("Groups ({0}):".format(groups_data['totalItems'])) for g in groups_data['items']: print(" {0} ({1})".format(g['name'], g['count'])) print("Unassigned agents: {0}.".format( Agent.get_agents_without_group()['totalItems']))