'Allow the session to be discarded and don\'t get change notifications from it anymore'

def detach_session(self):

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