code: def fake_py_reader(data_iter, num):
      def fake_iter():
          queue = []
          for idx, data in enumerate(data_iter()):
              queue.append(data)
              if len(queue) == num:
                  yield queue
                  queue = []
          if len(queue) > 0:
              while len(queue) < num:
                  queue.append(queue[-1])
              yield queue
  
      return fake_iter
  
file_path: PGL/legacy/examples/distribute_graphsage/cluster_train.py
imports: import argparse
  import time
  import os
  import math
  import numpy
  import paddle.fluid
  import paddle.fluid.layers
  from paddle.fluid.incubate.fleet.parameter_server.distribute_transpiler import fleet
  from paddle.fluid.transpiler.distribute_transpiler import DistributeTranspilerConfig
  import paddle.fluid.incubate.fleet.base.role_maker
  from pgl.utils.logger import log
  from model import GraphsageModel
  from utils import load_config
  import reader
label_desc: Use image node_id 4 for calling a global function with example usage: fake_py_reader(data_iter, num) and returns: fake_iter