Merge sort implementation in Python