code: def hessian_tensor_product(fun, argnum=0):
      """Builds a function that returns the exact Hessian-tensor product.
      The returned function has arguments (*args, tensor, **kwargs), and for
      vectors takes roughly 4x as long to evaluate as the original function.
      """
      fun_grad = grad(fun, argnum)
  
      def vector_dot_grad(*args, **kwargs):
          args, vector = args[:-1], args[-1]
          return np.tensordot(
              fun_grad(*args, **kwargs), vector, np.ndim(vector)
          )
  
      return grad(vector_dot_grad, argnum)
  
imports: from __future__ import absolute_import
  from functools import partial
  from collections import OrderedDict
  import warnings
  from .wrap_util import unary_to_nary
  from .builtins import tuple
  from .core import make_vjp, make_jvp
  from .extend import primitive, defvjp_argnum, vspace
  import autograd.numpy
label_desc: Use image node_id 9 for calling a global function with example usage: hessian_tensor_product(fun, argnum) and returns: grad, np