'Determine the last piece of information we know for each column on each
date in the index for each sid and quarter.
Parameters
assets_with_data : pd.Index
Index of all assets that appear in the raw data given to the
loader.
columns : iterable of BoundColumn
The columns that need to be loaded from the raw data.
dates : pd.DatetimeIndex
The calendar of dates for which data should be loaded.
Returns
stacked_last_per_qtr : pd.DataFrame
A DataFrame indexed by [dates, sid, normalized_quarters] that has
the latest information for each row of the index, sorted by event
date.
last_per_qtr : pd.DataFrame
A DataFrame with columns that are a MultiIndex of [
self.estimates.columns, normalized_quarters, sid].'

def get_last_data_per_qtr(self, assets_with_data, columns, dates):

    last_per_qtr = last_in_date_group(self.estimates, dates, assets_with_data, reindex=True, extra_groupers=[NORMALIZED_QUARTERS])
    ffill_across_cols(last_per_qtr, columns, self.name_map)
    stacked_last_per_qtr = last_per_qtr.stack([SID_FIELD_NAME, NORMALIZED_QUARTERS])
    stacked_last_per_qtr.index.set_names(SIMULATION_DATES, level=0, inplace=True)
    stacked_last_per_qtr = stacked_last_per_qtr.sort_values(EVENT_DATE_FIELD_NAME)
    stacked_last_per_qtr[EVENT_DATE_FIELD_NAME] = pd.to_datetime(stacked_last_per_qtr[EVENT_DATE_FIELD_NAME])
    return (last_per_qtr, stacked_last_per_qtr)
