#NEWLINE# def GetNotifications( self , queue ) : #NEWLINE# #INDENT# 'Returns all queue notifications sorted by priority.' #NEWLINE# queue_shard = self . GetNotificationShard ( queue ) #NEWLINE# notifications = self . _GetUnsortedNotifications ( queue_shard ) . values ( ) #NEWLINE# notifications . sort ( key = ( lambda notification : notification . priority ) , reverse = True ) #NEWLINE# return queue_shard