Given a list of integers, return a new list where any consecutive duplicate elements are collapsed to a single occurrence. Only duplicates that appear next to each other should be removed; non-consecutive repeats should be kept. Examples: - [1, 1, 2, 2, 3] -> [1, 2, 3] - [1, 2, 1, 1] -> [1, 2, 1] Write a function that performs this transformation.
([1, 1, 2, 2, 3, 3, 3],)[1, 2, 3]