def fit_results_to_dict(fit_results, min_bound=None, max_bound=None):
type_map = {'<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>', '<STR_LIT>': '<STR_LIT>'}<EOL>param_map = {'<STR_LIT>': lambda p: [('<STR_LIT>', p[<NUM_LIT:0>]), ('<STR_LIT>', p[<NUM_LIT:0>] + p[<NUM_LIT:1>])],<EOL>'<STR_LIT>': lambda p: [('<STR_LIT>', p[<NUM_LIT:0>]), ('<STR_LIT>', p[<NUM_LIT:1>])],<EOL>'<STR_LIT>': lambda p: [('<STR_LIT>', <NUM_LIT:1.0> / p[<NUM_LIT:1>])]}<EOL>d = OrderedDict({'<STR_LIT:type>': type_map[fit_results.type]})<EOL>d.update(param_map[fit_results.type](fit_results.params))<EOL>if min_bound is not None and '<STR_LIT>' not in d:<EOL><INDENT>d['<STR_LIT>'] = min_bound<EOL><DEDENT>if max_bound is not None and '<STR_LIT>' not in d:<EOL><INDENT>d['<STR_LIT>'] = max_bound<EOL><DEDENT>return d<EOL>
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'