map-reduce histograms in python