def METHOD_NAME(rules):
    for rule in rules:
        if rule.type == "error":
            yield "error", rule
            continue
        if rule.type == "at-rule" and rule.content:
            at_rules = tinycss2.parser.parse_rule_list(
                rule.content, skip_comments=True, skip_whitespace=True
            )
            media_selector = selectors.media_query_selector(rule.prelude)
            if not media_selector:
                continue
            media_query = compile_node(media_selector)
            yield from (
                ((_combine(media_query, selspec[0]), selspec[1]), declaration)
                for selspec, declaration in METHOD_NAME(at_rules)
                if selspec != "error"
            )
        if rule.type != "qualified-rule":
            continue
        try:
            selector_list = compile_selector_list(rule.prelude)
        except selectors.SelectorError as e:
            yield "error", e
            continue
        declaration = {
            prop: value
            for prop, value in parse_declarations(rule.content)
            if prop != "error" and value is not None
        }
        yield from ((selector, declaration) for selector in selector_list)