def get_session(self, session_id: str) -> dict:
        """Get a session by session_id.

        :param session_id: Unique session ID.
        :return: Session data as a dictionary.
        :rtype: dict
        """
        self.cursor.execute(
            "SELECT * FROM sessions WHERE session_id = ?", (session_id,)
        )
        row = self.cursor.fetchone()
        if row is not None:
            session = dict(row)  # Convert sqlite3.Row to dictionary
            session["metadata"] = json.loads(session["metadata"])
            return session

        else:
            return {}  # Return an empty dictionary if no data found
Get a session by session_id.

        :param session_id: Unique session ID.
        :return: Session data as a dictionary.
        :rtype: dict
        
backend/director/db/sqlite/db.py