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
  
imports: import os
  import tqdm
  import yaml
  import pgl
  import time
  import copy
  import numpy
  import os.path
  from pgl.utils.logger import log
  from pgl.graph import Graph
  from pgl import graph_kernel
  from pgl.sampling.custom import subgraph
  from ogb.lsc import MAG240MDataset, MAG240MEvaluator
  from dataset.base_dataset import BaseDataGenerator
  import time
label_desc: Use image node_id 2 for calling a global function with example usage: traverse(item) without return types