key = tuple(sorted(word))
or
key = (x,y)
Many problems implicitly use compound / composite keys (often encoded as tuples, strings, or multiple fields).
key = tuple(counts) # composite representation
Why it matters:
You learn to collapse multiple features into one hashable key, which is exactly what (client, time_bucket) does.