Simple one file mapreduce template in Python