'Schedule a set of Task() instances.'

def Schedule(self, tasks, sync=False, timestamp=None, mutation_pool=None):

    if (timestamp is None):
        timestamp = self.frozen_timestamp
    for (queue, queued_tasks) in utils.GroupBy(tasks, (lambda x: x.queue)).iteritems():
        if queue:
            to_schedule = dict([(self._TaskIdToColumn(task.task_id), [task.SerializeToString()]) for task in queued_tasks])
            if mutation_pool:
                mutation_pool.MultiSet(queue, to_schedule, timestamp=timestamp)
            else:
                self.data_store.MultiSet(queue, to_schedule, timestamp=timestamp, sync=sync, token=self.token)
