#NEWLINE# @ classmethod #NEWLINE# def get_lists( cls ) : #NEWLINE# #INDENT# discovery_map = cls . get_map ( ) #NEWLINE# top_categories = sorted ( discovery_map . keys ( ) , key = ( lambda tc : tc . rank ) ) #NEWLINE# sub_category_groups = [ ] #NEWLINE# discovery_item_groups = [ ] #NEWLINE# for ( top_category , sub_category_map ) in discovery_map . iteritems ( ) : #NEWLINE# #INDENT# sorted_sub_cats = sorted ( sub_category_map . keys ( ) , key = ( lambda sc : sc . rank ) ) #NEWLINE# sub_category_groups . append ( ( sorted_sub_cats , top_category ) ) #NEWLINE# for ( sub_category , discovery_items ) in sub_category_map . iteritems ( ) : #NEWLINE# #INDENT# discovery_item_groups . append ( ( discovery_items , top_category , sub_category ) ) #NEWLINE# #UNINDENT# #UNINDENT# sub_category_groups = sorted ( sub_category_groups , key = ( lambda group : group [ 1 ] . rank ) ) #NEWLINE# discovery_item_groups = sorted ( discovery_item_groups , key = ( lambda group : ( ( 10 * group [ 1 ] . rank ) + group [ 2 ] . rank ) ) ) #NEWLINE# return ( top_categories , sub_category_groups , discovery_item_groups )