def combine(data):
    """ 
    Combine measurements across items in 'data'

    'data' is list of results objects calculated 
    for different input files. Each results object is a dict
    of (date_time_bucket, measurement_instance_list) pairs.
    """
    reduced_data = {}
    for chunk_data in data:
        for time_bucket_key, measurements in chunk_data.items():
            for measurement in measurements:
                if time_bucket_key not in reduced_data:
                    reduced_data[time_bucket_key] = [measurement]
                else:
                    measurement_exists = False
                    for existing_measurement in reduced_data[time_bucket_key]:
                        if measurement.get_name(
                            ) == existing_measurement.get_name():
                            existing_measurement.combine(measurement)
                            measurement_exists = True
                    if measurement_exists is False:
                        reduced_data[time_bucket_key].append(measurement)
    return reduced_data
