code: def traverse_nested(input_lists, types=(list, tuple)):
      """
      Flatten a nested list or tuple
      """
  
      if isinstance(input_lists, types):
          for input_list in input_lists:
              for sub_list in traverse_nested(input_list, types=types):
                  yield sub_list
      else:
          yield input_lists
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import datetime
  import os
  import re
  from functools import partial
  import numpy
  import tensorflow
  from scipy import ndimage
  from six import string_types
label_desc: Use image node_id 1 for calling a global function with example usage: traverse_nested(input_lists, types) without return types