Revert "Revert "pipeline.py""

This reverts commit 4658e8ac030c49c4475261b6075a7b180c272d9a.