code: def write_dividend_data(self, dividends, stock_dividends=None):
          
  
          # First write the dividend payouts.
          self._write_dividends(dividends)
          self._write_stock_dividends(stock_dividends)
  
          # Second from the dividend payouts, calculate ratios.
          dividend_ratios = self.calc_dividend_ratios(dividends)
          self.write_frame('dividends', dividend_ratios)
docs: Write both dividend payouts and the derived price adjustment ratios.