#NEWLINE# def test_project_multigraph( self ) : #NEWLINE# #INDENT# G = nx . Graph ( ) #NEWLINE# G . add_edge ( 'a' , 1 ) #NEWLINE# G . add_edge ( 'b' , 1 ) #NEWLINE# G . add_edge ( 'a' , 2 ) #NEWLINE# G . add_edge ( 'b' , 2 ) #NEWLINE# P = bipartite . projected_graph ( G , 'ab' ) #NEWLINE# assert_edges_equal ( P . edges ( ) , [ ( 'a' , 'b' ) ] ) #NEWLINE# P = bipartite . weighted_projected_graph ( G , 'ab' ) #NEWLINE# assert_edges_equal ( P . edges ( ) , [ ( 'a' , 'b' ) ] ) #NEWLINE# P = bipartite . projected_graph ( self , 'ab' , multigraph = True ) #NEWLINE# assert_edges_equal ( P . edges ( ) , [ ( 'a' , 'b' ) , ( 'a' , 'b' ) ] )