Write a method to print duplicate integers in an array of integers.
Implement print_duplicates(nums), which returns a list containing each duplicated value exactly once, ordered by the index where it is first identified as a duplicate. The input is a list of integers, and the result should be an empty list when no value occurs more than once.
def print_duplicates(nums):