def guess_format(path):
for fmt in formats:<EOL><INDENT>if fmt.verify(path):<EOL><INDENT>return fmt.__name__<EOL><DEDENT><DEDENT>else:<EOL><INDENT>msg = "<STR_LIT>".format(path)<EOL>raise UnknownFileFormatError(msg)<EOL><DEDENT>
Determine the file format of a folder or a file