def session_ended(self): """ run cleanup on exceptions or disconnection. idea: collect stats and store them in this function """ tracker.track_logout('sftp', session_id=self.uuid, ip=self.client_ip, user=self.user)