code: def hess_ndt(fun, pars, args, options):
      import numdifftools as ndt
  
      if not ("stepMax" in options or "stepFix" in options):
          options["stepMax"] = 1e-5
      f = lambda params: fun(params, *args)
      h = ndt.Hessian(f, **options)
      return h(pars), h
  
file_path: statsmodels/statsmodels/sandbox/distributions/estimators.py
imports: import numpy
  from scipy import stats, optimize, special
label_desc: Use image node_id 9 for calling a global function with example usage: hess_ndt(fun, pars, args, options) and returns: h,  h