def METHOD_NAME(
    triples: List[Tuple[Node, Node, Node]], error_message: str, caplog
):
    graph = Graph()
    for triple in triples:
        graph = graph.add(triple)
    with pytest.raises(SystemExit):
        parse_namespace_and_spdx_id(graph)
    assert error_message in caplog.text