def get_human_readable_user_ids(user_ids):
 users_settings = get_users_settings(user_ids)
 usernames = []
 for (ind, user_settings) in enumerate(users_settings):
  if (user_settings is None):
   logging.error(('User id %s not known in list of user_ids %s' % (user_ids[ind], user_ids)))
   raise Exception('User not found.')
  elif (user_settings.user_id == feconf.SYSTEM_COMMITTER_ID):
   usernames.append('admin')
  elif user_settings.username:
   usernames.append(user_settings.username)
  else:
   usernames.append(('[Awaiting user registration: %s]' % user_settings.truncated_email))
 return usernames

def get_human_readable_user_ids ( user_ids ) : users_settings = get_users_settings ( user_ids ) usernames = [ ] for ( ind , user_settings ) in enumerate ( users_settings ) : if ( user_settings is None ) : logging . error ( ( 'User id %s not known in list of user_ids %s' % ( user_ids [ ind ] , user_ids ) ) ) raise Exception ( 'User not found.' ) elif ( user_settings . user_id == feconf . SYSTEM_COMMITTER_ID ) : usernames . append ( 'admin' ) elif user_settings . username : usernames . append ( user_settings . username ) else : usernames . append ( ( '[Awaiting user registration: %s]' % user_settings . truncated_email ) ) return usernames
converts the given ids to usernames .