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