code: def _test_minute_dividends(self):
      # self.DIVIDEND_ASSET had dividends on 1/6 and 1/7
  
      # before any of the dividends
      window1 = self.data_portal.get_history_window(
          [self.DIVIDEND_ASSET],
          pd.Timestamp("2015-01-05 21:00", tz="UTC"),
          10,
          "1m",
          "close",
          "minute",
      )[self.DIVIDEND_ASSET]
  
      np.testing.assert_array_equal(np.array(range(382, 392)), window1)
  
      # straddling the first dividend (10 active equity minutes)
      window2_start = pd.Timestamp("2015-01-05 20:56", tz="UTC")
      window2_end = pd.Timestamp("2015-01-06 14:35", tz="UTC")
      window2_count = len(
          self.trading_calendar.minutes_in_range(
              window2_start, window2_end
          )
      )
      window2 = self.data_portal.get_history_window(
          [self.DIVIDEND_ASSET],
          window2_end,
          window2_count,
          "1m",
          "close",
          "minute",
      )[self.DIVIDEND_ASSET]
  
      # first dividend is 2%, so the first five values should be 2% lower
      # than before
      np.testing.assert_array_almost_equal(
          np.array(range(387, 392), dtype="float64") * 0.98,
          window2[0:5],
      )
  
      # second half of window is unadjusted
      np.testing.assert_array_equal(range(392, 397), window2[-5:])
  
      # straddling both dividends (on the equities calendar, this is
      # 5 minutes of 1/7, 390 of 1/6, and 5 minutes of 1/5).
      window3_start = pd.Timestamp("2015-01-05 20:56", tz="UTC")
      window3_end = pd.Timestamp("2015-01-07 14:35", tz="UTC")
      window3_minutes = self.trading_calendar.minutes_in_range(
          window3_start,
          window3_end,
      )
      window3_count = len(window3_minutes)
      window3 = self.data_portal.get_history_window(
          [self.DIVIDEND_ASSET],
          window3_end,
          window3_count,
          "1m",
          "close",
          "minute",
      )[self.DIVIDEND_ASSET]
  
      # first five minute from 1/7 should be hit by 0.9408 (= 0.98 * 0.96)
      np.testing.assert_array_almost_equal(
          np.around(
              np.array(range(387, 392), dtype="float64") * 0.9408, 3
          ),
          window3[0:5],
      )
  
      # next 390 minutes (the 2015-01-06 session) should be hit by 0.96
      # (second dividend)
      middle_day_open_i = window3_minutes.searchsorted(
          pd.Timestamp("2015-01-06 14:31", tz="UTC")
      )
      middle_day_close_i = window3_minutes.searchsorted(
          pd.Timestamp("2015-01-06 21:00", tz="UTC")
      )
      np.testing.assert_array_almost_equal(
          np.array(range(392, 782), dtype="float64") * 0.96,
          window3[middle_day_open_i : middle_day_close_i + 1],
      )
  
      # last 5 minutes should not be adjusted
      np.testing.assert_array_equal(
          np.array(range(782, 787)), window3[-5:]
      )
  
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 10 for calling the MinuteEquityHistoryTestCase obj's underlying member method code with example usage: obj._test_minute_dividends() without return types