Implementing pipelines in scikit-learn