code: def _tf_gradients_forward_over_back_hvp(
      model, images, labels, vector
  ):
      with tf.GradientTape() as grad_tape:
          logits = model(images, training=True)
          loss = tf.compat.v1.losses.softmax_cross_entropy(
              logits=logits, onehot_labels=labels
          )
      variables = model.trainable_variables
      grads = grad_tape.gradient(loss, variables)
      helpers = tf.nest.map_structure(tf.ones_like, grads)
      transposing = tf.gradients(grads, variables, helpers)
      return tf.gradients(transposing, helpers, vector)
  
imports: import gc
  import time
  from absl.testing import parameterized
  import tensorflow
  from tensorflow.python.eager import forwardprop
  from tensorflow.python.eager.benchmarks.resnet50 import resnet50
  from tensorflow.python.eager.benchmarks.resnet50 import resnet50_test_util
label_desc: Use image node_id 3 for calling a global function with example usage: _tf_gradients_forward_over_back_hvp(model, images, labels, vector) and returns: tf