code: def test_gnmk_random_graph(self):
      n = 10
      m = 20
      edges = 100
      # set seed because sometimes it is not connected
      # which raises an error in bipartite.sets(G) below.
      G = gnmk_random_graph(n, m, edges, seed=1234)
      assert len(G) == n + m
      assert nx.is_bipartite(G)
      X, Y = nx.algorithms.bipartite.sets(G)
      # print(X)
      assert set(range(n)) == X
      assert set(range(n, n + m)) == Y
      assert edges == len(list(G.edges()))
  
file_path: networkx/networkx/algorithms/bipartite/tests/test_generators.py
imports: import numbers
  import pytest
  import networkx
  from ..generators import alternating_havel_hakimi_graph, complete_bipartite_graph, configuration_model, gnmk_random_graph, havel_hakimi_graph, preferential_attachment_graph, random_graph, reverse_havel_hakimi_graph
label_desc: Use image node_id 9 for calling the TestGeneratorsBipartite obj's underlying member method code with example usage: obj.test_gnmk_random_graph() without return types