group_anagrams(words) that groups a list of words so that all anagrams of each other end up in the same sublist. Return a list of these groups, ordered by each group's first appearance in words; within a group, preserve the original order of the words.words = ['eat', 'tea', 'tan', 'ate', 'nat', 'bat']
[['eat', 'tea', 'ate'], ['tan', 'nat'], ['bat']]
'eat'/'tea'/'ate' share sorted letters 'aet'; 'tan'/'nat' share 'ant'; 'bat' is alone.
A canonical key for a word is its letters sorted, e.g. `''.join(sorted(word))`.
Group words by that key in a dictionary, tracking key insertion order to build the final answer.