code: def map_trace_to_names(trace, params):
      """Map trace to parameter names."""
      out = {}
      allnames = list(params.keys()) + ["prob"]
      for name in trace.keys():
          tmp_dict = {}
          tmp = np.array(trace[name])
          for para_name, values in zip(allnames, tmp.T):
              tmp_dict[para_name] = values
          out[name] = tmp_dict
      return out
  
file_path: lmfit-py/lmfit/confidence.py
imports: from warnings import warn
  import numpy
  from scipy.optimize import root_scalar
  from scipy.special import erf
  from scipy.stats import f
  from .minimizer import MinimizerException
label_desc: Use image node_id 5 for calling a global function with example usage: map_trace_to_names(trace, params) and returns: out