def _import_arbitrary_start(self, records):
        if records == []:
            return pd.Series([]), pd.Series([])
        try:
            sorted_records = sorted(records, key=lambda x: x["start"])
        except __HOLE__:
            message = 'Records must all have a "start" key.'
            raise ValueError(message)
        start_datetimes = []
        values = []
        estimateds = []
        for record in sorted_records:
            start = record["start"]
            value = record.get("value")
            estimated = record.get("estimated")
            start_datetimes.append(start)
            values.append(value)
            estimateds.append(bool(estimated))
        # append an element if the last record has an end date.
        last_end = sorted_records[-1].get("end")
        if last_end is None:
            values[-1] = np.nan
        else:
            start_datetimes.append(last_end)
            values.append(np.nan)
            estimateds.append(False)
        dt_index = pd.DatetimeIndex(start_datetimes)
        data = pd.Series(values, index=dt_index)
        estimated = pd.Series(estimateds, index=dt_index)
        return data, estimated
dataset/ETHPy150Open impactlab/eemeter/eemeter/consumption.py/ConsumptionData._import_arbitrary_start