def _LogInvalidRunLevels(states, valid):
 invalid = set()
 for state in states:
  if (state not in valid):
   invalid.add(state)
 if invalid:
  logging.warn('Invalid init runlevel(s) encountered: %s', ', '.join(invalid))

def _LogInvalidRunLevels ( states , valid ) : invalid = set ( ) for state in states : if ( state not in valid ) : invalid . add ( state ) if invalid : logging . warn ( 'Invalid init runlevel(s) encountered: %s' , ', ' . join ( invalid ) )
log any invalid run states found .