class_docstr: Tracks the performance of the algorithm.
docstr: Check if we currently own any stocks with dividends whose ex_date is
  the next trading day.  Track how much we should be payed on those
  dividends' pay dates.
  
  Then check if we are owed cash/stock for any dividends whose pay date
  is the next trading day.  Apply all such benefits, then recalculate
  performance.
docstr_tok: ["Check","if","we","currently","own","any","stocks","with","dividends","whose","ex_date","is","the","next","trading","day",".","Track","how","much","we","should","be","payed","on","those","dividends","'","pay","dates",".","Then","check","if","we","are","owed","cash\/stock","for","any","dividends","whose","pay","date","is","the","next","trading","day",".","Apply","all","such","benefits",",","then","recalculate","performance","."]
code: def check_upcoming_dividends(self, next_session, adjustment_reader):
      """
      Check if we currently own any stocks with dividends whose ex_date is
      the next trading day.  Track how much we should be payed on those
      dividends' pay dates.
  
      Then check if we are owed cash/stock for any dividends whose pay date
      is the next trading day.  Apply all such benefits, then recalculate
      performance.
      """
      if adjustment_reader is None:
          return
      position_tracker = self.position_tracker
      held_sids = set(position_tracker.positions)
      # Dividends whose ex_date is the next trading day.  We need to check if
      # we own any of these stocks so we know to pay them out when the pay
      # date comes.
  
      if held_sids:
          cash_dividends = adjustment_reader.get_dividends_with_ex_date(
              held_sids, next_session, self.asset_finder
          )
          stock_dividends = (
              adjustment_reader.get_stock_dividends_with_ex_date(
                  held_sids, next_session, self.asset_finder
              )
          )
  
          position_tracker.earn_dividends(
              cash_dividends, stock_dividends
          )
  
      net_cash_payment = position_tracker.pay_dividends(next_session)
      if not net_cash_payment:
          return
  
      self.cumulative_performance.handle_dividends_paid(
          net_cash_payment
      )
      self.todays_performance.handle_dividends_paid(net_cash_payment)
  
imports: from __future__ import division
  import logbook
  import pandas
  from pandas.tseries.tools import normalize_date
  from catalyst.finance.performance.period import PerformancePeriod
  from catalyst.errors import NoFurtherDataError
  import catalyst.finance.risk
  from .position_tracker import PositionTracker
  from catalyst.constants import LOG_LEVEL
label_desc: Use image node_id 17 for calling the PerformanceTracker obj's underlying member method code with example usage: obj.check_upcoming_dividends(next_session, adjustment_reader) without return types