def make_numbered_dir(root, prefix):
for i in range(<NUM_LIT:10>):<EOL><INDENT>max_existing = _max(map(parse_num, find_suffixes(root, prefix)), default=-<NUM_LIT:1>)<EOL>new_number = max_existing + <NUM_LIT:1><EOL>new_path = root.joinpath("<STR_LIT>".format(prefix, new_number))<EOL>try:<EOL><INDENT>new_path.mkdir()<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>_force_symlink(root, prefix + "<STR_LIT>", new_path)<EOL>return new_path<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise EnvironmentError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>".format(prefix=prefix, root=root)<EOL>)<EOL><DEDENT>
create a directory with an increased number as suffix for the given prefix