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

def clear_line(mode=2):
    ''' Clear the current line.

        Arguments:

            mode:  | 0 | 'forward'  | 'right' - Clear cursor to end of line.
                   | 1 | 'backward' | 'left'  - Clear cursor to beginning of line.
                   | 2 | 'full'               - Clear entire line.

        Note:
            Cursor position does not change.
    '''
    text = sc.erase_line(_mode_map.get(mode, mode))
    _write(text)
    return text