mapreduce langchain python