Write a function to identify duplicates in a list of transaction IDs.
Return each duplicated ID exactly once, in the order its repetition is first detected. Return an empty list when no ID appears more than once.
Input: a list of strings. Output: a list of strings.
Example: ['tx1', 'tx2', 'tx1', 'tx3', 'tx2'] returns ['tx1', 'tx2'].
Constraints: The list contains 0 to 100,000 IDs, each ID is a non-empty string.
def identify_duplicates(transaction_ids):