code: def _warn_jac_unused(jac, method):
      if jac is not None:
          warn(
              f"Method {method} does not use the jacobian (jac).",
              RuntimeWarning,
              stacklevel=2,
          )
  
file_path: scipy/scipy/optimize/_root.py
imports: import numpy
  from warnings import warn
  from ._optimize import MemoizeJac, OptimizeResult, _check_unknown_options
  from ._minpack_py import _root_hybr, leastsq
  from ._spectral import _root_df_sane
  from .None import _nonlin
label_desc: Use image node_id 2 for calling a global function with example usage: _warn_jac_unused(jac, method) without return types