:hatching_chick: A function to remove consecutive duplicates.