def METHOD_NAME(steps: t.List[Step]) -> DAG:
    dag = DAG()
    # add all vertexes before add edges
    for step in steps:
        dag.add_vertex(step.name)
    for step in steps:
        for pre in step.needs or []:
            dag.add_edge(pre, step.name)
    return dag