Write a program to sort an array of integers without using built-in libraries. Implement sort_integers(nums), where nums is a list of integers and the function returns the values in nondecreasing order. Do not call sort, sorted, or any library sorting utility; implement the sorting logic manually.
def sort_integers(nums):