def _data_collection_from_dict(self, mapping, data_dict):
        data_collection = DataCollection()
        for result_name, target_data in mapping.items():

            target_value = data_dict.get(result_name)
            if target_value is None:
                message = "Data not found during mapping: {}" \
                        .format(result_name)
                raise ValueError(message)

            if type(target_data) is not list:
                target_data = [target_data]
            for td in target_data:
                target_name = td.get("name", result_name)
                target_tags = td.get("tags", [])
                data = DataContainer(target_name, target_value, target_tags)
                data_collection.add_data(data)

        return data_collection
Resolves a dict to DataCollection mapping.
dataset/ETHPy150Open impactlab/eemeter/eemeter/meter/base.py/MeterBase._data_collection_from_dict