def most_popular_groups():
 groups = toolkit.get_action('group_list')(data_dict={'sort': 'packages desc', 'all_fields': True})
 groups = groups[:10]
 return groups

def most_popular_groups ( ) : groups = toolkit . get_action ( 'group_list' ) ( data_dict = { 'sort' : 'packages desc' , 'all_fields' : True } ) groups = groups [ : 10 ] return groups
return a sorted list of the groups with the most datasets .