code: def testRandomBipartiteNP(self):
      # Test np mode, undirected
      g = Graph.Random_Bipartite(10, 20, p=0.25)
      self.assertTrue(g.is_simple())
      self.assertTrue(g.is_bipartite())
      self.assertFalse(g.is_directed())
      self.assertEqual([False] * 10 + [True] * 20, g.vs["type"])
  
      # Test np mode, directed, "out"
      g = Graph.Random_Bipartite(
          10, 20, p=0.25, directed=True, neimode="out"
      )
      self.assertTrue(g.is_simple())
      self.assertTrue(g.is_bipartite())
      self.assertTrue(g.is_directed())
      self.assertEqual([False] * 10 + [True] * 20, g.vs["type"])
      self.assertTrue(
          all(g.vs[e.tuple]["type"] == [False, True] for e in g.es)
      )
  
      # Test np mode, directed, "in"
      g = Graph.Random_Bipartite(
          10, 20, p=0.25, directed=True, neimode="in"
      )
      self.assertTrue(g.is_simple())
      self.assertTrue(g.is_bipartite())
      self.assertTrue(g.is_directed())
      self.assertEqual([False] * 10 + [True] * 20, g.vs["type"])
      self.assertTrue(
          all(g.vs[e.tuple]["type"] == [True, False] for e in g.es)
      )
  
      # Test np mode, directed, "all"
      g = Graph.Random_Bipartite(
          10, 20, p=0.25, directed=True, neimode="all"
      )
      self.assertTrue(g.is_simple())
      self.assertTrue(g.is_bipartite())
      self.assertTrue(g.is_directed())
      self.assertEqual([False] * 10 + [True] * 20, g.vs["type"])
  
file_path: python-igraph/tests/test_games.py
imports: import unittest
  from igraph import Graph, InternalError, Layout
label_desc: Use image node_id 8 for calling the GameTests obj's underlying member method code with example usage: obj.testRandomBipartiteNP() without return types