from typing import List
import re


def collected_items(code: str) -> List[str]:
    """Extract passing and failing items from fnmatch_lines() call in code."""
    # remove any lines with comments
    code_less_comments = re.sub(r"#.*?$", "", code, flags=re.MULTILINE)
    pattern = r'"[*](.* PASSED|.* FAILED)[*]"'
    return re.findall(pattern=pattern, string=code_less_comments)