code: def open_session_log(self, filename, mode="write"):
          
          if mode == "append":
              self.session_log = open(filename, mode="ab")
          else:
              self.session_log = open(filename, mode="wb")
          self._session_log_close = True
docs: Open the session_log file.