<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(self, tid):
 """ Returns the parameters found in the stack when the hooked function was last called by this thread. @type tid: int @param tid: Thread global ID. @return: Tuple of arguments. """

        try:
            params = self.get_params_stack(tid)[-1]
        except IndexError:
            msg = "Hooked function called from thread %d already returned"
            raise IndexError(msg % tid)
        return params