code: def jvp(func: Callable, primals, tangents):
      flattened_primals, ret_idxs = _flatten_containers(primals)
      flattened_tangents, _ = _flatten_containers(tangents)
  
      def grad_fn(*x_in):
          return _flatten_containers(
              ivy.to_native(
                  func(
                      *ivy.to_ivy(
                          _rebuild_flattened_containers(x_in, ret_idxs),
                          nested=True,
                      )
                  ),
                  nested=True,
                  include_derived=True,
              )
          )
  
      flattened_primals = ivy.to_native(flattened_primals, nested=True)
      flattened_tangents = ivy.to_native(
          flattened_tangents, nested=True
      )
  
      with tf.autodiff.ForwardAccumulator(
          flattened_primals,
          flattened_tangents,
      ) as acc:
          flat_primals_out, func_ret_idxs = grad_fn(*flattened_primals)
      tangents_out = acc.jvp(flat_primals_out)
  
      return ivy.to_ivy(
          (
              _rebuild_flattened_containers(
                  flat_primals_out, func_ret_idxs
              ),
              _rebuild_flattened_containers(
                  tangents_out, func_ret_idxs
              ),
          ),
          nested=True,
          include_derived=True,
      )
  
file_path: ivy/ivy/functional/backends/tensorflow/experimental/gradients.py
imports: import tensorflow
  from typing import Callable
  import ivy
  from ivy.func_wrapper import inputs_to_native_arrays
  from ivy.functional.ivy.gradients import _get_required_float_variables
  from ivy.functional.ivy.gradients import _flatten_containers, _rebuild_flattened_containers
label_desc: Use image node_id 3 for calling a global function with example usage: jvp(func, primals, tangents) and returns: ivy, _flatten_containers