code: def _jac_restructured(jacs, tapes):
      """
      Reconstruct the nested tuple structure of the jacobian of a list of tapes
      """
      start = 0
      jacs_nested = []
      for tape in tapes:
          num_meas = len(tape.measurements)
          num_params = len(tape.trainable_params)
  
          tape_jacs = tuple(jacs[start : start + num_meas * num_params])
          tape_jacs = tuple(
              tuple(tape_jacs[i * num_params : (i + 1) * num_params])
              for i in range(num_meas)
          )
  
          while isinstance(tape_jacs, tuple) and len(tape_jacs) == 1:
              tape_jacs = tape_jacs[0]
  
          jacs_nested.append(tape_jacs)
          start += num_meas * num_params
  
      return tuple(jacs_nested)
  
file_path: pennylane/pennylane/workflow/interfaces/tensorflow.py
imports: import inspect
  import logging
  import tensorflow
  from tensorflow.python.eager import context
  import pennylane
  from pennylane.measurements import Shots
  from pennylane.transforms import convert_to_numpy_parameters
label_desc: Use image node_id 6 for calling a global function with example usage: _jac_restructured(jacs, tapes) and returns: tuple