<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def detach_session(self):
 """Allow the session to be discarded and don't get change notifications from it anymore"""

        if self._session is not None:
            self._session.unsubscribe(self)
            self._session = None