Add filter to python map/reduce