code: def _tf_data_flatten_up_to(shallow_tree, input_tree):
      _tf_data_assert_shallow_structure(shallow_tree, input_tree)
      return list(_tf_data_yield_flat_up_to(shallow_tree, input_tree))
  
imports: import collections
  import enum
  import wrapt
  from tensorflow.python import pywrap_tensorflow
  from tensorflow.python.platform import tf_logging
  from tensorflow.python.util import _pywrap_utils
  from tensorflow.python.util.compat import collections_abc
  from tensorflow.python.util.custom_nest_protocol import CustomNestProtocol
label_desc: Use image node_id 33 for calling a global function with example usage: _tf_data_flatten_up_to(shallow_tree, input_tree) and returns: list