docs: def fit_results_to_dict(fit_results, min_bound=None, max_bound=None):
      '''Create a JSON-comparable dict from a FitResults object
  
      Parameters:
          fit_results (FitResults): object containing fit parameters,\
              errors and type
          min_bound: optional min value to add to dictionary if min isn't\
              a fit parameter.
          max_bound: optional max value to add to dictionary if max isn't\
              a fit parameter.
  
      Returns:
          JSON-compatible dictionary with fit results
  
      Note:
          Supported fit types: 'norm', 'expon', 'uniform'
      '''
  
      type_map = {'norm': 'normal', 'expon': 'exponential', 'uniform': 'uniform'}
      param_map = {'uniform': lambda p: [('min', p[0]), ('max', p[0] + p[1])],
                   'norm': lambda p: [('mu', p[0]), ('sigma', p[1])],
                   'expon': lambda p: [('lambda', 1.0 / p[1])]}
  
      d = OrderedDict({'type': type_map[fit_results.type]})
      d.update(param_map[fit_results.type](fit_results.params))
  
      if min_bound is not None and 'min' not in d:
          d['min'] = min_bound
      if max_bound is not None and 'max' not in d:
          d['max'] = max_bound
  
      return d