code: def traverse(item):
      """traverse"""
      if isinstance(item, list) or isinstance(item, np.ndarray):
          for i in iter(item):
              for j in traverse(i):
                  yield j
      else:
          yield item
  
file_path: PGL/legacy/examples/distribute_graphsage/reader.py
imports: import os
  import sys
  import numpy
  import pickle
  import paddle
  import paddle.fluid
  import socket
  import pgl
  import time
  from pgl.utils import mp_reader
  from pgl.utils.logger import log
  from pgl import redis_graph
label_desc: Use image node_id 2 for calling a global function with example usage: traverse(item) without return types