<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pop_result(self, key):
 """Returns the result for ``key`` and unregisters it."""

        self.pending_callbacks.remove(key)
        return self.results.pop(key)