def _check_orphans(cursor):
 orphans = cursor.all('\n        select username\n           from participants\n          where not exists (select * from elsewhere where elsewhere.participant=username)\n            and not exists (select * from absorptions where archived_as=username)\n    ')
 assert (len(orphans) == 0), 'missing elsewheres: {}'.format(list(orphans))

def _check_orphans ( cursor ) : orphans = cursor . all ( '\n        select username\n           from participants\n          where not exists (select * from elsewhere where elsewhere.participant=username)\n            and not exists (select * from absorptions where archived_as=username)\n    ' ) assert ( len ( orphans ) == 0 ) , 'missing elsewheres: {}' . format ( list ( orphans ) )
finds participants that * does not have corresponding elsewhere account * have not been absorbed by other participant these are broken because new participants arise from elsewhere and elsewhere is detached only by take over which makes a note in absorptions if it removes the last elsewhere account .