how to code the merge sort algorithm in python