Write a function that sorts an array of integers.
Implement sort_integers(nums) to return a new array containing the same integers in ascending order. Do not modify the input array. The function must handle empty arrays, duplicates, and negative values.
Input: A list of integers nums.
Output: A new list containing all values from nums in nondecreasing order.
Examples:
nums = [5, 2, 8, 1] returns [1, 2, 5, 8].nums = [3, -1, 3, 0] returns [-1, 0, 3, 3].Constraints: 0 <= len(nums) <= 1000; each integer is between -10^9 and 10^9.
def sort_integers(nums):