I stumbled on this pipeline idea reading this page:
https://mtomassoli.wordpress.com/2012/03/29/pipelining-in-py...
but the implementation looked quite complicated.
The code in this github repo is both simpler and more powerful, since it can handle generator expressions seamlessly.