code: def _jacobian(f, xs, grad_ys):
      assert grad_ys is None
      with tf.GradientTape(
          persistent=True, watch_accessed_variables=False
      ) as tape:
          for x in xs:
              tape.watch(x)
          y, aux = f()
      try:
          return y, tuple(tape.batch_jacobian(y, x) for x in xs), aux
      except ValueError:  # Fallback to for-loop jacobian.
          return (
              y,
              tuple(
                  tape.batch_jacobian(y, x, experimental_use_pfor=False)
                  for x in xs
              ),
              aux,
          )
  
file_path: probability/tensorflow_probability/python/math/gradient.py
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow.python.util import tf_inspect
label_desc: Use image node_id 7 for calling a global function with example usage: _jacobian(f, xs, grad_ys) and returns: y,  tuple,  aux, y,  tuple,  aux