class_docstr: The current state of the positions held.
  
  Parameters
  ----------
  data_frequency : {'daily', 'minute'}
      The data frequency of the simulation.
class_docstr_tok: ["The","current","state","of","the","positions","held",".","Parameters","--","--","--","--","--","data_frequency",":","{","'daily","'",",","'minute","'","}","The","data","frequency","of","the","simulation","."]
docstr: Returns a cash payment based on the dividends that should be paid out
  according to the accumulated bookkeeping of earned, unpaid, and stock
  dividends.
code: def pay_dividends(self, next_trading_day):
      """
      Returns a cash payment based on the dividends that should be paid out
      according to the accumulated bookkeeping of earned, unpaid, and stock
      dividends.
      """
      net_cash_payment = 0.0
  
      try:
          payments = self._unpaid_dividends[next_trading_day]
          # Mark these dividends as paid by dropping them from our unpaid
          del self._unpaid_dividends[next_trading_day]
      except KeyError:
          payments = []
  
      # representing the fact that we're required to reimburse the owner of
      # the stock for any dividends paid while borrowing.
      for payment in payments:
          net_cash_payment += payment["amount"]
  
      # Add stock for any stock dividends paid.  Again, the values here may
      # be negative in the case of short positions.
      try:
          stock_payments = self._unpaid_stock_dividends[
              next_trading_day
          ]
      except KeyError:
          stock_payments = []
  
      for stock_payment in stock_payments:
          payment_asset = stock_payment["payment_asset"]
          share_count = stock_payment["share_count"]
          # note we create a Position for stock dividend if we don't
          # already own the asset
          if payment_asset in self.positions:
              position = self.positions[payment_asset]
          else:
              position = self.positions[payment_asset] = Position(
                  payment_asset,
              )
  
          position.amount += share_count
  
      return net_cash_payment
  
imports: from __future__ import division
  from collections import namedtuple, OrderedDict
  from functools import partial
  from math import isnan
  import logbook
  import numpy
  import pandas
  from six import iteritems, itervalues, PY2
  from zipline.assets import Future
  from zipline.finance.transaction import Transaction
  import zipline.protocol
  from zipline.utils.sentinel import sentinel
  from .position import Position
  from ._finance_ext import PositionStats, calculate_position_tracker_stats, update_position_last_sale_prices
label_desc: Use image node_id 7 for calling the PositionTracker obj's underlying member method code with example usage: obj.pay_dividends(next_trading_day) and returns: net_cash_payment