Simple sequential mapreduce interpreter in Python