code: def value_jacobian_and_hessian(func, func_out_ndim=0):
      """Compute value, jacobian and hessian.
  
      func is called as many times as the output dim.
  
      Parameters
      ----------
      func : callable
          Function whose jacobian and hessian values
          will be computed.
      func_out_ndim : int
          func output ndim.
      """
  
      def _value_jacobian_and_hessian(*args, **kwargs):
          """Return func's jacobian and func's hessian at args.
  
          Parameters
          ----------
          args : list
              Argument to function func and its gradients.
          kwargs : dict
              Keyword arguments to function func and its gradients.
  
          Returns
          -------
          value : array-like
              Value of func at input arguments args.
          jacobian : array-like
              Value of func's jacobian at input arguments args.
          hessian : array-like
              Value of func's hessian at input arguments args.
          """
          return (
              func(*args, **kwargs),
              jacobian_vec(func)(*args, **kwargs),
              hessian_vec(func, func_out_ndim=func_out_ndim)(
                  *args, **kwargs
              ),
          )
  
      return _value_jacobian_and_hessian
  
file_path: geomstats/geomstats/_backend/pytorch/autodiff.py
imports: import functools
  import numpy
  import torch
  from torch.autograd.functional import hessian
  from torch.autograd.functional import jacobian
label_desc: Use image node_id 8 for calling a global function with example usage: value_jacobian_and_hessian(func, func_out_ndim) and returns: _value_jacobian_and_hessian, func,  jacobian_vec,  hessian_vec