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: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  from __future__ import absolute_import
  from dataloader.base_dataloader import BaseDataGenerator
  from utils.to_undirected import to_undirected
  import ssl
  from pgl.contrib.ogb.nodeproppred.dataset_pgl import PglNodePropPredDataset
  from pgl.sample import graph_saint_random_walk_sample
  from ogb.nodeproppred import Evaluator
  import tqdm
  from collections import namedtuple
  import pgl
  import numpy
  import copy
label_desc: Use image node_id 1 for calling a global function with example usage: traverse(item) without return types