def METHOD_NAME(filename):
    if filename in EXCLUDE or os.path.basename(filename) in EXCLUDE:
        return True
    if filename.startswith(EXCLUDE_DIRS):
        return True
    for pat in EXCLUDE_GLOBS:
        if fnmatch.fnmatch(filename, pat):
            return True
    return False