<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def logout(self):
 """Logs your user out"""


        if not self.logged_in:
            raise RuntimeError("User is not logged in")
        if self.conn.connected:
            params = {"room": self.conn.room.room_id}
            resp = self.conn.make_api_call("logout", params)
            if not resp.get("success", False):
                raise RuntimeError(
                    f"Logout unsuccessful: "
                    f"{resp['error'].get('message') or resp['error']}"
                )
            self.conn.make_call("logout", params)
            self.conn.cookies.pop("session")
        self.logged_in = False