Add merge_partially_sorted.py