def METHOD_NAME(self):
    fh = io.BytesIO()
    G = nx.Graph()
    G.add_edge(1, 2, weight=2.0)
    G.add_edge(2, 3, weight=3.0)
    G.add_node(1, bipartite=0)
    G.add_node(2, bipartite=1)
    G.add_node(3, bipartite=0)
    bipartite.write_edgelist(G, fh, data=[("weight")])
    fh.seek(0)
    assert fh.read() == b"1 2 2.0\n3 2 3.0\n"