def reset(self, new_session=True):
self.output_hist.clear()<EOL>self.dir_hist[:] = [os.getcwdu()]<EOL>if new_session:<EOL><INDENT>if self.session_number:<EOL><INDENT>self.end_session()<EOL><DEDENT>self.input_hist_parsed[:] = ["<STR_LIT>"]<EOL>self.input_hist_raw[:] = ["<STR_LIT>"]<EOL>self.new_session()<EOL><DEDENT>
Clear the session history, releasing all object references, and
        optionally open a new session.