Merge the values for each key using an associative and commutative reduce function.
By Lauren O'Reilly at Mar 10 2020