docs: def transform_package(mtype, files, components):
      '''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
      '''
      data_dict = transform_header(mtype)
      neurons = load_neurons(files)
  
      for comp in components:
          params = PARAM_MAP[comp.name]
          for feature in comp.features:
              result = stats.fit_results_to_dict(
                  extract_data(neurons, feature.name, params),
                  feature.limits.min, feature.limits.max
              )
  
              # When the distribution is normal with sigma = 0
              # it will be replaced with constant
              if result['type'] == 'normal' and result['sigma'] == 0.0:
                  replace_result = OrderedDict((('type', 'constant'),
                                                ('val', result['mu'])))
                  result = replace_result
  
              data_dict["components"][comp.name].update({feature.name: result})
  
      return data_dict