def chain(*tasks):
for up_task, down_task in zip(tasks[:-<NUM_LIT:1>], tasks[<NUM_LIT:1>:]):<EOL><INDENT>up_task.set_downstream(down_task)<EOL><DEDENT>
Given a number of tasks, builds a dependency chain.

chain(task_1, task_2, task_3, task_4)

is equivalent to

task_1.set_downstream(task_2)
task_2.set_downstream(task_3)
task_3.set_downstream(task_4)