def filename_match(filename, patterns, default=True):
if not patterns:<EOL><INDENT>return default<EOL><DEDENT>return any(fnmatch(filename, pattern) for pattern in patterns)<EOL>
Check if patterns contains a pattern that matches filename.

    If patterns is unspecified, this always returns True.