code: def multiprocess_data_generator(config, dataset):
      """Multiprocess data generator."""
      if config.num_sample_workers == 1:
          data_generator = DataGenerator(config, dataset)
      else:
          pool = [
              DataGenerator(config, dataset)
              for i in range(config.num_sample_workers)
          ]
          data_generator = mp_reader.multiprocess_reader(
              pool, use_pipe=True, queue_size=100
          )
  
      return data_generator
  
imports: from __future__ import division
  from __future__ import absolute_import
  from __future__ import print_function
  import time
  import io
  import os
  import numpy
  import random
  from pgl.utils.logger import log
  from pgl.sample import metapath_randomwalk
  from pgl.graph_kernel import skip_gram_gen_pair
  from pgl.graph_kernel import alias_sample_build_table
  from utils import load_config
  from graph import m2vGraph
  import mp_reader
label_desc: Use image node_id 1 for calling a global function with example usage: multiprocess_data_generator(config, dataset) and returns: data_generator