<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_params_stack(self, tid):
 """ Returns the parameters found in the stack each time the hooked function was called by this thread and hasn't returned yet. @type tid: int @param tid: Thread global ID. @return: List of argument tuples. """

        try:
            stack = self.__paramStack[tid]
        except KeyError:
            msg = "Hooked function was not called from thread %d"
            raise KeyError(msg % tid)
        return stack