We should explicitly state the form of a good key function.  My guess from your example is that `key` is a function from args, kwargs to some hashable?