code: def _test_daily_dividends(self):
      # self.DIVIDEND_ASSET had dividends on 1/6 and 1/7
  
      jan5 = pd.Timestamp("2015-01-05", tz="UTC")
      asset = self.DIVIDEND_ASSET
  
      # before any of the dividends
      window1 = self.data_portal.get_history_window(
          [asset],
          self.trading_calendar.open_and_close_for_session(jan5)[1],
          2,
          "1d",
          "close",
          "minute",
      )[asset]
  
      np.testing.assert_array_equal(np.array([nan, 391]), window1)
  
      # straddling the first event
      window2 = self.data_portal.get_history_window(
          [asset],
          pd.Timestamp("2015-01-06 14:35", tz="UTC"),
          2,
          "1d",
          "close",
          "minute",
      )[asset]
  
      np.testing.assert_array_equal(
          [
              383.18,  # 391 (last close) * 0.98 (first div)
              # Dividend occurs prior.
              396,
          ],
          window2,
      )
  
      # straddling both events!
      window3 = self.data_portal.get_history_window(
          [asset],
          pd.Timestamp("2015-01-07 14:35", tz="UTC"),
          3,
          "1d",
          "close",
          "minute",
      )[asset]
  
      np.testing.assert_array_equal(
          [
              367.853,  # 391 (last close) * 0.98 * 0.96 (both)
              749.76,  # 781 (last_close) * 0.96 (second div)
              786,
          ],  # no adjustment
          window3,
      )
  
      # after last event
      window4 = self.data_portal.get_history_window(
          [asset],
          pd.Timestamp("2015-01-08 14:40", tz="UTC"),
          2,
          "1d",
          "close",
          "minute",
      )[asset]
  
      # should not be adjusted, should be 787 to 791
      np.testing.assert_array_equal([1171, 1181], window4)
  
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 4 for calling the MinuteEquityHistoryTestCase obj's underlying member method code with example usage: obj._test_daily_dividends() without return types