def _handle_meter_data(bs, meters, business=None):
    for meter in meters:
        # Make mutations to our own copy of meter.
        meter = copy.deepcopy(meter)
        pk = meter.pop('id', None)
        m = None
        ts_data = meter.get('timeseries_data', [])
        energy_type = meter.get('energy_type', 'Electricity')
        meter['energy_type'] = convert_choice_data(
            energy_type, ENERGY_TYPES
        )

        energy_units = meter.pop('energy_units', 'kWh')
        meter['energy_units'] = convert_choice_data(
            energy_units, ENERGY_UNITS
        )
        if business:
            meter['business_id'] = business.pk
        if pk:
            m = Meter.objects.get(pk=pk)
            m.name = meter.get('name')
            m.energy_type = meter.get('energy_type')
            m.energy_units = meter.get('energy_units')
            m.building_snapshot.add(bs)
            if business:
                m.business = business
            m.save()

        elif meter:
            # Create the meter if one didn't already exist.
            # Remove this so we can safely create Meter model.
            if ts_data:
                del meter['timeseries_data']
            m = Meter.objects.create(**meter)

        if m:
            _handle_ts_data(m, ts_data)
        bs.meters.add(m)

    return bs
Harness to test if the FrameSet.start call works properly.
dataset/ETHPy150Open buildingenergy/buildingenergy-platform/seed/models.py/_handle_meter_data--crossover with--dataset/ETHPy150Open sqlboy/fileseq/test/run.py/TestFrameSet._check_start