python implementation of examining none cyclic DAG and exporting tree for devops with multiple applications deployment in sequence