def METHOD_NAME(gds: GraphDataScience) -> None:
    nx_G = nx.DiGraph()
    nx_G.add_node(42, labels=1337)
    with pytest.raises(
        ValueError,
        match=re.escape(
            "`labels` node attributes must be of type `str` or `list[str]`. Given `labels`: 1337 for node with id 42"
        ),
    ):
        gds.graph.networkx._parse(nx_G)