(team_a, team_b) tuples where ("X", "Y") and ("Y", "X") are the same matchup. Write duplicate_matchups(pairs) returning a sorted list of the matchups (as sorted tuples) that were scheduled more than once.duplicate_matchups([('X', 'Y'), ('Z', 'W'), ('Y', 'X')])[('X', 'Y')]('X','Y') and ('Y','X') collide as the same matchup.
Normalize each pair to a frozenset (or a sorted tuple) before counting.
Track a seen set and a dupes set while looping.