'dates : pd.DatetimeIndex
The calendar dates.
sid : int
The sid for which we want to retrieve adjustments.
split_adjusted_asof_idx : int
The index in `dates` as-of which the data is split adjusted.
Returns
pre_adjustments : tuple(list(float), list(int), pd.DatetimeIndex)
The adjustment values and indexes in `dates` for
adjustments that happened before the split-asof-date.
post_adjustments : tuple(list(float), list(int), pd.DatetimeIndex)
The adjustment values, indexes in `dates`, and timestamps for
adjustments that happened after the split-asof-date.'

def retrieve_split_adjustment_data_for_sid(self, dates, sid, split_adjusted_asof_idx):

    adjustments = self._split_adjustments.get_adjustments_for_sid('splits', sid)
    sorted(adjustments, key=(lambda adj: adj[0]))
    adjustments = list(filter((lambda x: (dates[0] <= x[0] <= dates[(-1)])), adjustments))
    adjustment_values = np.array([adj[1] for adj in adjustments])
    timestamps = pd.DatetimeIndex([adj[0] for adj in adjustments])
    date_indexes = dates.searchsorted(timestamps)
    pre_adjustment_idxs = np.where((date_indexes <= split_adjusted_asof_idx))[0]
    last_adjustment_split_asof_idx = (-1)
    if len(pre_adjustment_idxs):
        last_adjustment_split_asof_idx = pre_adjustment_idxs.max()
    pre_adjustments = (adjustment_values[:(last_adjustment_split_asof_idx + 1)], date_indexes[:(last_adjustment_split_asof_idx + 1)])
    post_adjustments = (adjustment_values[(last_adjustment_split_asof_idx + 1):], date_indexes[(last_adjustment_split_asof_idx + 1):], timestamps[(last_adjustment_split_asof_idx + 1):])
    return (pre_adjustments, post_adjustments)
