code: def build_random_graph(num_nodes):
      edges = np.random.randint(0, num_nodes, [4 * num_nodes, 2])
      graph = pgl.graph.Graph(num_nodes, edges)
      graph.indegree()
      graph.outdegree()
      return graph
  
file_path: PGL/legacy/examples/distribute_deepwalk/utils.py
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import unicode_literals
  import os
  import time
  import numpy
  from pgl.utils.logger import log
  from pgl.graph import Graph
  from pgl.sample import graph_alias_sample_table
  from reader import DeepwalkReader
  import mp_reader
label_desc: Use image node_id 4 for calling a global function with example usage: build_random_graph(num_nodes) and returns: graph