#NEWLINE# def group_table( groups ) : #NEWLINE# #INDENT# 'Returns a PrettyTable representation of the provided marathon\n    groups\n\n    :param groups: groups to render\n    :type groups: [dict]\n    :rtype: PrettyTable\n\n    ' #NEWLINE# group_dict = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for group in groups : #NEWLINE# #INDENT# _count_apps ( group , group_dict ) #NEWLINE# #UNINDENT# fields = OrderedDict ( [ ( 'ID' , ( lambda g : g [ 0 ] [ 'id' ] ) ) , ( 'APPS' , ( lambda g : g [ 1 ] ) ) ] ) #NEWLINE# tb = table ( group_dict , group_dict . values ( ) , sortby = 'ID' ) #NEWLINE# tb . align [ 'ID' ] = 'l' #NEWLINE# return tb