code: def _test_daily_dividends(self):
      # self.DIVIDEND_ASSET had dividends on 1/6 and 1/7
  
      # before any dividend
      window1 = self.data_portal.get_history_window(
          [self.DIVIDEND_ASSET],
          pd.Timestamp("2015-01-05", tz="UTC"),
          1,
          "1d",
          "close",
          "daily",
      )[self.DIVIDEND_ASSET]
  
      np.testing.assert_array_equal(window1, [2])
  
      # straddling the first dividend
      window2 = self.data_portal.get_history_window(
          [self.DIVIDEND_ASSET],
          pd.Timestamp("2015-01-06", tz="UTC"),
          2,
          "1d",
          "close",
          "daily",
      )[self.DIVIDEND_ASSET]
  
      # first dividend is 2%, so the first value should be 2% lower than
      # before
      np.testing.assert_array_equal([1.96, 3], window2)
  
      # straddling both dividends
      window3 = self.data_portal.get_history_window(
          [self.DIVIDEND_ASSET],
          pd.Timestamp("2015-01-07", tz="UTC"),
          3,
          "1d",
          "close",
          "daily",
      )[self.DIVIDEND_ASSET]
  
      # second dividend is 0.96
      # first value should be 0.9408 of its original value, rounded to 3
      # digits. second value should be 0.96 of its original value
      np.testing.assert_array_equal([1.882, 2.88, 4], window3)
  
imports: from textwrap import dedent
  from nose_parameterized import parameterized
  import numpy
  from numpy import nan
  import pandas
  from six import iteritems
  from catalyst import TradingAlgorithm
  from catalyst._protocol import handle_non_market_minutes, BarData
  from catalyst.assets import Asset, Equity
  from catalyst.errors import HistoryInInitialize, HistoryWindowStartsBeforeData
  from catalyst.finance.trading import SimulationParameters
  from catalyst.finance.asset_restrictions import NoRestrictions
  from catalyst.testing import create_minute_df_for_asset, str_to_seconds, MockDailyBarReader
  from catalyst.testing.fixtures import WithCreateBarData, WithDataPortal, CatalystTestCase, alias
label_desc: Use image node_id 8 for calling the DailyEquityHistoryTestCase obj's underlying member method code with example usage: obj._test_daily_dividends() without return types