<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def up_to(self, key):
        '''Gets the recently inserted values up to a key'''
        for okey, ovalue in reversed(self.history):
            if okey == key:
                break
            else:
                yield ovalue