code: def test_stock_dividends(self):
      sids = np.arange(5)
      dates = self.trading_calendar.all_sessions.tz_convert(None)
  
      def T(n):
          return dates[n]
  
      sort_key = ["sid", "ex_date", "payment_sid", "ratio"]
      input_ = pd.DataFrame(
          [
              [0, T(0), 1.5, 1],
              [0, T(1), 0.5, 2],
              # the same asset has two stock dividends for different assets on
              # the same day
              [1, T(0), 1, 2],
              [1, T(0), 1.2, 3],
          ],
          columns=["sid", "ex_date", "ratio", "payment_sid"],
      ).sort_values(sort_key)
  
      # give every extra date field a unique date so that we can make sure
      # they appear unchanged in the dividends payouts
      ix = 0
      for col in "declared_date", "record_date", "pay_date":
          extra_dates = dates[ix : ix + len(input_)]
          ix += len(input_)
          input_[col] = extra_dates
  
      self.writer_without_pricing(dates, sids).write(
          stock_dividends=input_
      )
      dfs = self.component_dataframes()
  
      output = dfs.pop("stock_dividend_payouts").sort_values(sort_key)
      self.assert_all_empty(dfs)
  
      assert_equal(output, input_)
  
imports: import logbook
  import numpy
  import pandas
  from zipline.data.adjustments import SQLiteAdjustmentReader, SQLiteAdjustmentWriter
  from zipline.data.in_memory_daily_bars import InMemoryDailyBarReader
  from zipline.testing import parameter_space
  from zipline.testing.predicates import assert_equal
  from zipline.testing.fixtures import WithInstanceTmpDir, WithTradingCalendars, WithLogger, ZiplineTestCase
label_desc: Use image node_id 13 for calling the TestSQLiteAdjustmentsWriter obj's underlying member method code with example usage: obj.test_stock_dividends() and returns: dates