def serviceStopped(self):
        """
        called when the service is stopped, either by the connection ending
        or by another service being started
        """

        called when the service is stopped, either by the connection ending
        or by another service being started
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/conch/ssh/service.py