code: def im_ratio(results):
      res = getattr(results, "_results", results)  # shortcut
      hess = res.model.hessian(res.params)
      if res.cov_type == "nonrobust":
          score_obs = res.model.score_obs(res.params)
          cov_score = score_obs.T @ score_obs
          hessneg_inv = np.linalg.inv(-hess)
          im_ratio = hessneg_inv @ cov_score
      else:
          im_ratio = res.cov_params() @ (-hess)
      return im_ratio
  
file_path: statsmodels/statsmodels/base/_parameter_inference.py
imports: import numpy
  from scipy import stats
label_desc: Use image node_id 4 for calling a global function with example usage: im_ratio(results) and returns: im_ratio