I don't like a get_item function with side effects.  Can you make a get_or_insert method that modifies internal state.