class_docstr: Wrapper for scipy.optimize.minimize.
  
  Only `jac` differs from scipy: if `autodiff`, then
  `gs.autodiff.value_and_grad` is used to compute the jacobian.
code: def _handle_jac(self, fun, fun_jac):
      if fun_jac is not None:
          return fun, fun_jac
  
      jac = self.jac
      if self.jac == "autodiff":
          jac = True
  
          def fun_(x):
              value, grad = gs.autodiff.value_and_grad(
                  fun, to_numpy=True
              )(gs.from_numpy(x))
              return value, grad
  
      else:
  
          def fun_(x):
              return fun(gs.from_numpy(x))
  
      return fun_, jac
  
file_path: geomstats/geomstats/numerics/optimizers.py
imports: import logging
  import scipy
  import geomstats.backend
  from geomstats.numerics._common import result_to_backend_type
label_desc: Use image node_id 2 for calling the ScipyMinimize obj's underlying member method code with example usage: obj._handle_jac(fun, fun_jac) and returns: fun_,  jac, fun,  fun_jac, value,  grad, fun