code: def _wrap_jac(jac, xdata, transform):
      if transform is None:
  
          def jac_wrapped(params):
              return jac(xdata, *params)
  
      elif transform.ndim == 1:
  
          def jac_wrapped(params):
              return transform[:, np.newaxis] * np.asarray(
                  jac(xdata, *params)
              )
  
      else:
  
          def jac_wrapped(params):
              return solve_triangular(
                  transform, np.asarray(jac(xdata, *params)), lower=True
              )
  
      return jac_wrapped
  
imports: import warnings
  from .None import _minpack
  import numpy
  from numpy import atleast_1d, triu, shape, transpose, zeros, prod, greater, asarray, inf, finfo, inexact, issubdtype, dtype
  from scipy import linalg
  from scipy.linalg import svd, cholesky, solve_triangular, LinAlgError
  from scipy._lib._util import _asarray_validated, _lazywhere, _contains_nan
  from scipy._lib._util import getfullargspec_no_self
  from ._optimize import OptimizeResult, _check_unknown_options, OptimizeWarning
  from ._lsq import least_squares
  from ._lsq.least_squares import prepare_bounds
  from scipy.optimize._minimize import Bounds
  from numpy import dot, eye, take
  from numpy.linalg import inv
label_desc: Use image node_id 7 for calling a global function with example usage: _wrap_jac(jac, xdata, transform) and returns: jac_wrapped, jac, unknown, solve_triangular