def get_session(
        self,
        session_id: Optional[str] = None,
        prev_round_id: Optional[str] = None,
    ) -> Session:
        """get session from session store, if session_id is None, create a new session"""
        if session_id is None:
            assert prev_round_id is None
            session_id = create_id()
            return self._get_session_from_store(session_id, True)

        current_session = self._get_session_from_store(session_id, False)

        if current_session is None:
            raise Exception("session id not found")

        # if current_session.prev_round_id == prev_round_id or prev_round_id is None:
        #     return current_session

        # # TODO: create forked session from existing session for resubmission, modification, etc.
        # raise Exception(
        #     "currently only support continuing session in the last round: "
        #     f" session id {current_session.session_id}, prev round id {current_session.prev_round_id}",
        # )
        return current_session
get session from session store, if session_id is None, create a new session
taskweaver/app/session_manager.py