def transform_package(mtype, files, components):
data_dict = transform_header(mtype)<EOL>neurons = load_neurons(files)<EOL>for comp in components:<EOL><INDENT>params = PARAM_MAP[comp.name]<EOL>for feature in comp.features:<EOL><INDENT>result = stats.fit_results_to_dict(<EOL>extract_data(neurons, feature.name, params),<EOL>feature.limits.min, feature.limits.max<EOL>)<EOL>if result['<STR_LIT:type>'] == '<STR_LIT>' and result['<STR_LIT>'] == <NUM_LIT:0.0>:<EOL><INDENT>replace_result = OrderedDict((('<STR_LIT:type>', '<STR_LIT>'),<EOL>('<STR_LIT>', result['<STR_LIT>'])))<EOL>result = replace_result<EOL><DEDENT>data_dict["<STR_LIT>"][comp.name].update({feature.name: result})<EOL><DEDENT><DEDENT>return data_dict<EOL>
Put together header and list of data into one json output.
       feature_list contains all the information about the data to be extracted:
       features, feature_names, feature_components, feature_min, feature_max