def parse_errors(err):
result = {}<EOL>py_ext = '<STR_LIT>'<EOL>lines = err.split('<STR_LIT:\n>')<EOL>while lines:<EOL><INDENT>curr_line = lines.pop(<NUM_LIT:0>)<EOL>filename = curr_line[:curr_line.find(py_ext) + len(py_ext)]<EOL>if lines:<EOL><INDENT>err_line = lines.pop(<NUM_LIT:0>).strip()<EOL>err_code = err_line.split('<STR_LIT::>')[<NUM_LIT:0>]<EOL>basename = os.path.basename(filename)<EOL>result.setdefault(basename, set()).add(err_code)<EOL><DEDENT><DEDENT>return result<EOL>
Parse `err` to a dictionary of {filename: error_codes}.

    This is for test purposes only. All file names should be different.