another example for map reduction in python