Attempt at a pipelined workflow in Python