def __del__ ( self ) : if self . _cleanup_session : self . _session . loop . run_until_complete ( self . _session . close ( ) )
quitting the existing python session
Cleanup the session if it was created here
def __del__(self):
        """Cleanup the session if it was created here"""
        if self._cleanup_session:
            self._session.loop.run_until_complete(self._session.close())