Hash Strategies Target: 10s
Grouping by computed key is the core of group-anagrams and bucket-sort approaches.
from collections import defaultdict
groups = defaultdict(list)
for item in items:
groups[key_fn(item)].append(item)
Type it from memory. Go.