Can you write a function to solve a specific algorithm from scratch?
Implement merge sort in Python. Given a list of integers, return a new list containing the same values in nondecreasing order without calling sorted() or .sort().
Signature: def merge_sort(nums): Input is a list of integers, and output is a sorted list of integers.
def merge_sort(nums):