def METHOD_NAME(self):
    G = nx.Graph()
    name1 = chr(2344) + chr(123) + chr(6543)
    name2 = chr(5543) + chr(1543) + chr(324)
    G.add_edge(name1, "Radiohead", **{name2: 3})
    G.add_node(name1, bipartite=0)
    G.add_node("Radiohead", bipartite=1)
    fd, fname = tempfile.mkstemp()
    pytest.raises(
        UnicodeEncodeError, bipartite.write_edgelist, G, fname, encoding="latin-1"
    )
    os.close(fd)
    os.unlink(fname)