code: def test_gen_speed(gen_func):
      cur_time = time.time()
      for idx, _ in enumerate(gen_func()):
          log.info("iter %s: %s s" % (idx, time.time() - cur_time))
          cur_time = time.time()
          if idx == 100:
              break
  
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 6 for calling a global function with example usage: test_gen_speed(gen_func) without return types