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