def ignore_rules_for_url(spider, url):
ignore_rules = getattr(spider, "<STR_LIT>", {}) or {}<EOL>return itertools.chain.from_iterable(<EOL>rule_list<EOL>for url_glob, rule_list<EOL>in ignore_rules.items()<EOL>if fnmatch.fnmatch(url, url_glob)<EOL>)<EOL>
Returns a list of ignore rules from the given spider,
that are relevant to the given URL.