mergesort in python