code: def value_jacobian_and_hessian(func, func_out_ndim=None):
      """Compute value, jacobian and hessian.
  
      func is only called once.
  
      Parameters
      ----------
      func : callable
          Function whose jacobian and hessian values
          will be computed.
      func_out_ndim : int
          Unused. Here for API consistency.
      """
      cache = []
  
      def _cached_value_and_jacobian(fun, return_cached=False):
          def _jac(x):
              ans, jac = _value_and_jacobian(fun)(x)
              if not return_cached:
                  cache.append(ans)
                  return jac
  
              value = (
                  _np.stack(cache)._value
                  if len(cache) > 1
                  else cache[0]._value
              )
              cache.clear()
  
              return value, ans, jac
  
          return _jac
  
      return _cached_value_and_jacobian(
          _cached_value_and_jacobian(func), return_cached=True
      )
  
file_path: geomstats/geomstats/_backend/autograd/autodiff.py
imports: import autograd
  import autograd.numpy
  from autograd import jacobian
label_desc: Use image node_id 11 for calling a global function with example usage: value_jacobian_and_hessian(func, func_out_ndim) and returns: _cached_value_and_jacobian, _jac, value,  ans,  jac, jac