code: def create_test_graph(num_nodes, num_edges_per_node, bipartite=False):
      src = np.concatenate(
          [np.array([i] * num_edges_per_node) for i in range(num_nodes)]
      )
      dst = np.concatenate(
          [
              np.random.choice(
                  num_nodes, num_edges_per_node, replace=False
              )
              for i in range(num_nodes)
          ]
      )
      if bipartite:
          g = dgl.heterograph({("u", "e", "v"): (src, dst)})
      else:
          g = dgl.graph((src, dst))
      return g
  
imports: import unittest
  import warnings
  import backend
  import dgl
  import numpy
  import pytest
label_desc: Use image node_id 23 for calling a global function with example usage: create_test_graph(num_nodes, num_edges_per_node, bipartite) and returns: g