<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def GetNotificationsForAllShards(self, queue):
 """Returns notifications for all shards of a queue at once. Used by worker_test_lib.MockWorker to cover all shards with a single worker. Args: queue: usually rdfvalue.RDFURN("aff4:/W") Returns: List of rdf_flows.GrrNotification objects """

    notifications_by_session_id = {}
    for queue_shard in self.GetAllNotificationShards(queue):
      self._GetUnsortedNotifications(
          queue_shard, notifications_by_session_id=notifications_by_session_id)

    return notifications_by_session_id.values()