Remove duplicate numbers in the array.
Implement remove_duplicates(nums) to return a new array containing each number once, preserving the order of its first appearance. The input is a list of integers, and the output must be a list of integers. Do not modify the input array.
def remove_duplicates(nums):