<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_history(pymux, variables):
    " Clear scrollback buffer. "
    pane = pymux.arrangement.get_active_pane()

    if pane.display_scroll_buffer:
        raise CommandException('Not available in copy mode')
    else:
        pane.process.screen.clear_history()