code: def _value_and_grads(f, x, has_aux=False):
      val, grad = gradient.value_and_gradient(f, x, has_aux=has_aux)
      _, grad_of_grad = gradient.value_and_gradient(
          lambda t: gradient.value_and_gradient(f, t)[1], x
      )
      return val, grad, grad_of_grad
  
file_path: probability/tensorflow_probability/python/experimental/distributions/marginal_fns_test.py
imports: import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.distributions import marginal_fns
  from tensorflow_probability.python.internal import test_util
  from tensorflow_probability.python.math import gradient
label_desc: Use image node_id 1 for calling a global function with example usage: _value_and_grads(f, x, has_aux) and returns: val,  grad,  grad_of_grad