def METHOD_NAME(self, exc):
    '''Callback on losing client connection'''
    if exc:
        print('SSH connection error: ' + str(exc), file=sys.stderr)
    else:
        print('SSH connection closed.')