<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def login_transplant(self, other):
 """Attempts to carry over the login state from another room"""


        if not other.logged_in:
            raise ValueError("Other room is not logged in")
        cookie = other.session
        if not cookie:
            raise ValueError("Other room has no cookie")
        self.conn.cookies.update({"session": cookie})
        self.session = cookie
        self.logged_in = True
        return True