def MultiNotifyQueue(self, notifications, timestamp=None, sync=True,
                       mutation_pool=None):
    extract_queue = lambda notification: notification.session_id.Queue()
    for queue, notifications in utils.GroupBy(
        notifications, extract_queue).iteritems():
      self._MultiNotifyQueue(
          queue, notifications, timestamp=timestamp, sync=sync,
          mutation_pool=mutation_pool)
initialize your data structure here.
dataset/ETHPy150Open google/grr/grr/lib/queue_manager.py/QueueManager.MultiNotifyQueue--crossover with--dataset/ETHPy150Open kamyu104/LeetCode/Python/range-sum-query-2d-immutable.py/NumMatrix.__init__