def get_data_for_transform_stages(self, agg_minutes, last_transform_timestamp, current_transform_timestamp, sc_regular, sc_first_incidents):
    data_regular = pd.DataFrame()
    data_first_incidents = pd.DataFrame()
    data = self.aggregate_data_for_historic_averages_model(agg_minutes=agg_minutes, start_time=last_transform_timestamp, end_time=current_transform_timestamp)
    if (len(data) > 0):
        data_regular = data.merge(sc_regular[self._config.service_call_fields])
    if (len(sc_first_incidents) > 100):
        data_first_incidents = self.aggregate_data_for_historic_averages_model(agg_minutes=agg_minutes, end_time=current_transform_timestamp)
        if (len(data_first_incidents) > 0):
            data_first_incidents = data_first_incidents.merge(sc_first_incidents[self._config.service_call_fields])
    elif (len(sc_first_incidents) > 0):
        data_first_incidents = self.aggregate_data_for_historic_averages_model(agg_minutes=agg_minutes, end_time=current_transform_timestamp, service_calls=sc_first_incidents[self._config.service_call_fields])
    return pd.concat([data_regular, data_first_incidents])
def get_data_for_transform_stages(self, agg_minutes, last_transform_timestamp, current_transform_timestamp, sc_regular, sc_first_incidents):
    data_regular = pd.DataFrame()
    data_first_incidents = pd.DataFrame()
    data = self.aggregate_data_for_historic_averages_model(agg_minutes=agg_minutes, start_time=last_transform_timestamp, end_time=current_transform_timestamp)
    if (len(data) > 0):
        data_regular = data.merge(sc_regular[self._config.service_call_fields])
    if (len(sc_first_incidents) > 100):
        data_first_incidents = self.aggregate_data_for_historic_averages_model(agg_minutes=agg_minutes, end_time=current_transform_timestamp)
        if (len(data_first_incidents) > 0):
            data_first_incidents = data_first_incidents.merge(sc_first_incidents[self._config.service_call_fields])
    elif (len(sc_first_incidents) > 0):
        data_first_incidents = self.aggregate_data_for_historic_averages_model(agg_minutes=agg_minutes, end_time=current_transform_timestamp, service_calls=sc_first_incidents[self._config.service_call_fields])
    return pd.concat([data_regular, data_first_incidents])