class_docstr: Estimates loader that loads data that needs to be split-adjusted.
  
  Parameters
  ----------
  split_adjustments_loader : SQLiteAdjustmentReader
      The loader to use for reading split adjustments.
  split_adjusted_column_names : iterable of str
      The column names that should be split-adjusted.
  split_adjusted_asof : pd.Timestamp
      The date that separates data into 2 halves: the first half is the set
      of dates up to and including the split_adjusted_asof date. All
      adjustments occurring during this first half are applied  to all
      dates in this first half. The second half is the set of dates after
      the split_adjusted_asof date. All adjustments occurring during this
      second half are applied sequentially as they appear in the timeline.
class_docstr_tok: ["Estimates","loader","that","loads","data","that","needs","to","be","split-adjusted",".","Parameters","--","--","--","--","--","split_adjustments_loader",":","SQLiteAdjustmentReader","The","loader","to","use","for","reading","split","adjustments",".","split_adjusted_column_names",":","iterable","of","str","The","column","names","that","should","be","split-adjusted",".","split_adjusted_asof",":","pd.Timestamp","The","date","that","separates","data","into","2","halves",":","the","first","half","is","the","set","of","dates","up","to","and","including","the","split_adjusted_asof","date",".","All","adjustments","occurring","during","this","first","half","are","applied","to","all","dates","in","this","first","half",".","The","second","half","is","the","set","of","dates","after","the","split_adjusted_asof","date",".","All","adjustments","occurring","during","this","second","half","are","applied","sequentially","as","they","appear","in","the","timeline","."]
docstr: Determines the date until which the adjustment at the given date
  index should be applied for the given quarter.
  
  Parameters
  ----------
  adjustment_ts : pd.Timestamp
      The timestamp at which the adjustment occurs.
  dates : pd.DatetimeIndex
      The calendar dates over which the Pipeline is being computed.
  upper_bound : int
      The index of the upper bound in the calendar dates. This is the
      index until which the adjusment will be applied unless there is
      information for the requested quarter that comes in on or before
      that date.
  requested_quarter : float
      The quarter for which we are determining how the adjustment
      should be applied.
  sid_estimates : pd.DataFrame
      The DataFrame of estimates data for the sid for which we're
      applying the given adjustment.
  
  Returns
  -------
  end_idx : int
      The last index to which the adjustment should be applied for the
      given quarter/sid.
docstr_tok: ["Determines","the","date","until","which","the","adjustment","at","the","given","date","index","should","be","applied","for","the","given","quarter",".","Parameters","--","--","--","--","--","adjustment_ts",":","pd.Timestamp","The","timestamp","at","which","the","adjustment","occurs",".","dates",":","pd.DatetimeIndex","The","calendar","dates","over","which","the","Pipeline","is","being","computed",".","upper_bound",":","int","The","index","of","the","upper","bound","in","the","calendar","dates",".","This","is","the","index","until","which","the","adjusment","will","be","applied","unless","there","is","information","for","the","requested","quarter","that","comes","in","on","or","before","that","date",".","requested_quarter",":","float","The","quarter","for","which","we","are","determining","how","the","adjustment","should","be","applied",".","sid_estimates",":","pd.DataFrame","The","DataFrame","of","estimates","data","for","the","sid","for","which","we're","applying","the","given","adjustment",".","Returns","--","--","--","-","end_idx",":","int","The","last","index","to","which","the","adjustment","should","be","applied","for","the","given","quarter\/sid","."]
code: def determine_end_idx_for_adjustment(
      self,
      adjustment_ts,
      dates,
      upper_bound,
      requested_quarter,
      sid_estimates,
  ):
      """
      Determines the date until which the adjustment at the given date
      index should be applied for the given quarter.
  
      Parameters
      ----------
      adjustment_ts : pd.Timestamp
          The timestamp at which the adjustment occurs.
      dates : pd.DatetimeIndex
          The calendar dates over which the Pipeline is being computed.
      upper_bound : int
          The index of the upper bound in the calendar dates. This is the
          index until which the adjusment will be applied unless there is
          information for the requested quarter that comes in on or before
          that date.
      requested_quarter : float
          The quarter for which we are determining how the adjustment
          should be applied.
      sid_estimates : pd.DataFrame
          The DataFrame of estimates data for the sid for which we're
          applying the given adjustment.
  
      Returns
      -------
      end_idx : int
          The last index to which the adjustment should be applied for the
          given quarter/sid.
      """
      end_idx = upper_bound
      # Find the next newest kd that happens on or after
      # the date of this adjustment
      newest_kd_for_qtr = sid_estimates[
          (sid_estimates[NORMALIZED_QUARTERS] == requested_quarter)
          & (sid_estimates[TS_FIELD_NAME] >= adjustment_ts)
      ][TS_FIELD_NAME].min()
      if pd.notnull(newest_kd_for_qtr):
          newest_kd_idx = dates.searchsorted(newest_kd_for_qtr)
          # We have fresh information that comes in
          # before the end of the overwrite and
          # presumably is already split-adjusted to the
          # current split. We should stop applying the
          # adjustment the day before this new
          # information comes in.
          if newest_kd_idx <= upper_bound:
              end_idx = newest_kd_idx - 1
      return end_idx
  
imports: from abc import abstractmethod, abstractproperty
  import numpy
  import pandas
  from six import viewvalues
  from toolz import groupby
  from catalyst.lib.adjusted_array import AdjustedArray
  from catalyst.lib.adjustment import Datetime641DArrayOverwrite, Datetime64Overwrite, Float641DArrayOverwrite, Float64Multiply, Float64Overwrite
  from catalyst.pipeline.common import EVENT_DATE_FIELD_NAME, FISCAL_QUARTER_FIELD_NAME, FISCAL_YEAR_FIELD_NAME, SID_FIELD_NAME, TS_FIELD_NAME
  from catalyst.pipeline.loaders.base import PipelineLoader
  from catalyst.utils.numpy_utils import datetime64ns_dtype, float64_dtype
  from catalyst.pipeline.loaders.utils import ffill_across_cols, last_in_date_group
label_desc: Use image node_id 5 for calling the SplitAdjustedEstimatesLoader obj's underlying member method code with example usage: obj.determine_end_idx_for_adjustment(adjustment_ts, dates, upper_bound, requested_quarter, sid_estimates) and returns: end_idx