'Given a sid, collect all overwrites that should be applied for this
sid at each quarter boundary.
Parameters
group : pd.DataFrame
The data for `sid`.
dates : pd.DatetimeIndex
The calendar dates for which estimates data is requested.
requested_qtr_data : pd.DataFrame
The DataFrame with the latest values for the requested quarter
for all columns.
last_per_qtr : pd.DataFrame
A DataFrame with a column MultiIndex of [self.estimates.columns,
normalized_quarters, sid] that allows easily getting the timeline
of estimates for a particular sid for a particular quarter.
sid_idx : int
The sid\'s index in the asset index.
columns : list of BoundColumn
The columns for which the overwrites should be computed.
all_adjustments_for_sid : dict[int -> AdjustedArray]
A dictionary of the integer index of each timestamp into the date
index, mapped to adjustments that should be applied at that
index for the given sid (`sid`). This dictionary is modified as
adjustments are collected.
sid : int
The sid for which overwrites should be computed.'

def collect_overwrites_for_sid(self, group, dates, requested_qtr_data, last_per_qtr, sid_idx, columns, all_adjustments_for_sid, sid):

    if (len(dates) == 1):
        return
    next_qtr_start_indices = dates.searchsorted(group[EVENT_DATE_FIELD_NAME].values, side=self.searchsorted_side)
    qtrs_with_estimates = group.index.get_level_values(NORMALIZED_QUARTERS).values
    for idx in next_qtr_start_indices:
        if (0 < idx < len(dates)):
            requested_quarter = requested_qtr_data[(SHIFTED_NORMALIZED_QTRS, sid)].iloc[idx]
            self.create_overwrites_for_quarter(all_adjustments_for_sid, idx, last_per_qtr, qtrs_with_estimates, requested_quarter, sid, sid_idx, columns)
