class_docstr: Base class for PipelineLoaders that supports loading the next and previous
  value of an event field.
  
  Does not currently support adjustments.
  
  Parameters
  ----------
  events : pd.DataFrame
      A DataFrame representing events (e.g. share buybacks or
      earnings announcements) associated with particular companies.
  
      ``events`` must contain at least three columns::
          sid : int64
              The asset id associated with each event.
  
          event_date : datetime64[ns]
              The date on which the event occurred.
  
          timestamp : datetime64[ns]
              The date on which we learned about the event.
  
  next_value_columns : dict[BoundColumn -> str]
      Map from dataset columns to raw field names that should be used when
      searching for a next event value.
  
  previous_value_columns : dict[BoundColumn -> str]
      Map from dataset columns to raw field names that should be used when
      searching for a previous event value.
class_docstr_tok: ["Base","class","for","PipelineLoaders","that","supports","loading","the","next","and","previous","value","of","an","event","field",".","Does","not","currently","support","adjustments",".","Parameters","--","--","--","--","--","events",":","pd.DataFrame","A","DataFrame","representing","events","(","e.g",".","share","buybacks","or","earnings","announcements",")","associated","with","particular","companies",".","``","events","``","must","contain","at","least","three","columns",":",":","sid",":","int64","The","asset","id","associated","with","each","event",".","event_date",":","datetime64","[","ns","]","The","date","on","which","the","event","occurred",".","timestamp",":","datetime64","[","ns","]","The","date","on","which","we","learned","about","the","event",".","next_value_columns",":","dict","[","BoundColumn","-",">","str","]","Map","from","dataset","columns","to","raw","field","names","that","should","be","used","when","searching","for","a","next","event","value",".","previous_value_columns",":","dict","[","BoundColumn","-",">","str","]","Map","from","dataset","columns","to","raw","field","names","that","should","be","used","when","searching","for","a","previous","event","value","."]
docstr: Split requested columns into columns that should load the next known
  value and columns that should load the previous known value.
  
  Parameters
  ----------
  requested_columns : iterable[BoundColumn]
  
  Returns
  -------
  next_cols, previous_cols : iterable[BoundColumn], iterable[BoundColumn]
      ``requested_columns``, partitioned into sub-sequences based on
      whether the column should produce values from the next event or the
      previous event
docstr_tok: ["Split","requested","columns","into","columns","that","should","load","the","next","known","value","and","columns","that","should","load","the","previous","known","value",".","Parameters","--","--","--","--","--","requested_columns",":","iterable","[","BoundColumn","]","Returns","--","--","--","-","next_cols",",","previous_cols",":","iterable","[","BoundColumn","]",",","iterable","[","BoundColumn","]","``","requested_columns","``",",","partitioned","into","sub-sequences","based","on","whether","the","column","should","produce","values","from","the","next","event","or","the","previous","event"]
code: def split_next_and_previous_event_columns(self, requested_columns):
      """
      Split requested columns into columns that should load the next known
      value and columns that should load the previous known value.
  
      Parameters
      ----------
      requested_columns : iterable[BoundColumn]
  
      Returns
      -------
      next_cols, previous_cols : iterable[BoundColumn], iterable[BoundColumn]
          ``requested_columns``, partitioned into sub-sequences based on
          whether the column should produce values from the next event or the
          previous event
      """
  
      def next_or_previous(c):
          if c in self.next_value_columns:
              return "next"
          elif c in self.previous_value_columns:
              return "previous"
  
          raise ValueError(
              "{c} not found in next_value_columns "
              "or previous_value_columns".format(c=c)
          )
  
      groups = groupby(next_or_previous, requested_columns)
      return groups.get("next", ()), groups.get("previous", ())
  
imports: import numpy
  import pandas
  from six import viewvalues
  from toolz import groupby, merge
  from .base import PipelineLoader
  from catalyst.pipeline.common import EVENT_DATE_FIELD_NAME, SID_FIELD_NAME, TS_FIELD_NAME
  from catalyst.pipeline.loaders.frame import DataFrameLoader
  from catalyst.pipeline.loaders.utils import next_event_indexer, previous_event_indexer
label_desc: Use image node_id 2 for calling the EventsLoader obj's underlying member method code with example usage: obj.split_next_and_previous_event_columns(requested_columns) and returns: groups,  groups, str, str