code: def _tf_data_map_structure_up_to(shallow_tree, func, *inputs):
      if not inputs:
          raise ValueError(
              "Argument `inputs` is empty. Cannot map over no sequences."
          )
      for input_tree in inputs:
          _tf_data_assert_shallow_structure(shallow_tree, input_tree)
  
      # Flatten each input separately, apply the function to corresponding elements,
      # then repack based on the structure of the first input.
      all_flattened_up_to = (
          _tf_data_flatten_up_to(shallow_tree, input_tree)
          for input_tree in inputs
      )
  
      results = [
          func(*tensors) for tensors in zip(*all_flattened_up_to)
      ]
      return _tf_data_pack_sequence_as(
          structure=shallow_tree, flat_sequence=results
      )
  
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 36 for calling a global function with example usage: _tf_data_map_structure_up_to(shallow_tree, func) and returns: _tf_data_pack_sequence_as