def _fit_models(options, core_results):
logging.info("<STR_LIT>")<EOL>models = options['<STR_LIT>'].replace('<STR_LIT:U+0020>', '<STR_LIT>').split('<STR_LIT:;>')<EOL>fit_results = []<EOL>for core_result in core_results:  <EOL><INDENT>fit_result = {}<EOL>for model in models:<EOL><INDENT>fits = _get_fits(core_result, model, options)<EOL>values = _get_values(core_result, model, fits)<EOL>stat_names, stats = _get_comparison_stat(core_result, values,<EOL>model, fits)<EOL>fit_result[model] = [fits, values, stat_names, stats]<EOL><DEDENT>fit_results.append(fit_result)<EOL><DEDENT>return fit_results<EOL>
Fit models to empirical result from a function in emp module

Parameters
----------
options : dict
    Option names and values for analysis
core_results : list of tuples
    Output of function in emp

Returns
-------
list of dicts
    Each element in list corresponds to a subset. The dict has a key for
    each model given in options, and the value is a list of fitted
    parameters (tuple), values (array), comparison statistic names (list),
    and comparison statistic values (list).

Notes
-----
To determine if the empirical result refers to a curve or a distribution,
the result dataframe is inspected for a column 'x', which indicates a
curve.