# Pastebin K92r2WtJ tasks = [] for action in action_plan.get_actions(): task = create_task(action) graph.add_task(task) tasks[action.uuid] = task for task in graph.tasks: parents = task.action.parents for parent in parents: task_parent = get_task(parent.uuid) graph.add_link(task, task_parent) get_task(uuid) return task[uuid]