sorted_merge.py