code: def testBipartiteProjection(self):
      g = Graph.Full_Bipartite(10, 5)
  
      g1, g2 = g.bipartite_projection()
      self.assertTrue(g1.isomorphic(Graph.Full(10)))
      self.assertTrue(g2.isomorphic(Graph.Full(5)))
      self.assertTrue(g.bipartite_projection(which=0).isomorphic(g1))
      self.assertTrue(g.bipartite_projection(which=1).isomorphic(g2))
      self.assertTrue(
          g.bipartite_projection(which=False).isomorphic(g1)
      )
      self.assertTrue(g.bipartite_projection(which=True).isomorphic(g2))
      self.assertTrue(g1.es["weight"] == [5] * 45)
      self.assertTrue(g2.es["weight"] == [10] * 10)
      self.assertTrue(g.bipartite_projection_size() == (10, 45, 5, 10))
  
      g1, g2 = g.bipartite_projection(probe1=10)
      self.assertTrue(g1.isomorphic(Graph.Full(5)))
      self.assertTrue(g2.isomorphic(Graph.Full(10)))
      self.assertTrue(g.bipartite_projection(which=0).isomorphic(g2))
      self.assertTrue(g.bipartite_projection(which=1).isomorphic(g1))
      self.assertTrue(
          g.bipartite_projection(which=False).isomorphic(g2)
      )
      self.assertTrue(g.bipartite_projection(which=True).isomorphic(g1))
  
      g1, g2 = g.bipartite_projection(multiplicity=False)
      self.assertTrue(g1.isomorphic(Graph.Full(10)))
      self.assertTrue(g2.isomorphic(Graph.Full(5)))
      self.assertTrue(g.bipartite_projection(which=0).isomorphic(g1))
      self.assertTrue(g.bipartite_projection(which=1).isomorphic(g2))
      self.assertTrue(
          g.bipartite_projection(which=False).isomorphic(g1)
      )
      self.assertTrue(g.bipartite_projection(which=True).isomorphic(g2))
      self.assertTrue("weight" not in g1.edge_attributes())
      self.assertTrue("weight" not in g2.edge_attributes())
  
file_path: python-igraph/tests/test_bipartite.py
imports: import unittest
  from igraph import Graph
label_desc: Use image node_id 6 for calling the BipartiteTests obj's underlying member method code with example usage: obj.testBipartiteProjection() without return types