def flatten_tasks(tasks_by_app_id):
    return set.union(set(), *(tasks_by_app_id.values()))
Takes a dictionary of app_id -> set([task, task, ...]) and returns the union of all the task sets.
dataset/ETHPy150Open Yelp/paasta/paasta_tools/bounce_lib.py/flatten_tasks