<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _cursorUp(self):
 """ Handles "cursor up" events """

        if self.historyPos > 0:
            self.historyPos -= 1
            clearLen = len(self.inputBuffer)
            self.inputBuffer = list(self.history[self.historyPos])
            self.cursorPos = len(self.inputBuffer)
            self._refreshInputPrompt(clearLen)