def get_names(file_dir, files):
<EOL>total_list = []<EOL>name_list = []<EOL>get_sub = False<EOL>for path, subdir, dir_files in os.walk(file_dir):<EOL><INDENT>if not get_sub:<EOL><INDENT>total_list = subdir[:]<EOL>get_sub = True<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>for user in total_list:<EOL><INDENT>has_file = True<EOL>for f in files:<EOL><INDENT>file_path = file_dir + user + "<STR_LIT:/>" + f + "<STR_LIT>"<EOL>if not os.path.exists(file_path):<EOL><INDENT>has_file = False<EOL>break<EOL><DEDENT><DEDENT>if has_file:<EOL><INDENT>name_list.append(user)<EOL><DEDENT><DEDENT>if len(name_list) == <NUM_LIT:0>:<EOL><INDENT>print("<STR_LIT>", file=ERROR_LOG)<EOL><DEDENT>return name_list<EOL>
Get the annotator name list based on a list of files
 Args:
 file_dir: AMR file folder
 files: a list of AMR names, e.g. nw_wsj_0001_1

 Returns:
a list of user names who annotate all the files