Implement `group_anagrams(words: list[str]) -> list[list[str]]`.
Return a list of groups; within each group words are anagrams. Order of groups and words within groups doesn't matter for comparison.
Constraints
0 ≤ len(words) ≤ 10^4; words contain only lowercase letters.