code: def multiprocess_data_generator(config, dataset):
      """Using multiprocess to generate training data."""
      num_sample_workers = config["trainer"]["args"][
          "num_sample_workers"
      ]
  
      walkpath_files = [[] for i in range(num_sample_workers)]
      for idx, f in enumerate(glob.glob(dataset.walk_files)):
          walkpath_files[idx % num_sample_workers].append(f)
  
      gen_data_pool = [
          dataset.pairs_generator(files) for files in walkpath_files
      ]
      if num_sample_workers == 1:
          gen_data_func = gen_data_pool[0]
      else:
          gen_data_func = mp_reader.multiprocess_reader(
              gen_data_pool, use_pipe=True, queue_size=100
          )
  
      return gen_data_func
  
imports: import os
  import sys
  import argparse
  import time
  import numpy
  import logging
  import pickle
  import shutil
  import glob
  import pgl
  from pgl.utils import paddle_helper
  import paddle
  import paddle.fluid
  import paddle.fluid.layers
  from utils import *
  import Dataset
  import model
  from pgl.utils import mp_reader
  from sklearn.metrics import auc, f1_score, precision_recall_curve, roc_auc_score
label_desc: Use image node_id 3 for calling a global function with example usage: multiprocess_data_generator(config, dataset) and returns: gen_data_func