code: def test_daily_splits_and_mergers(self):
      # self.SPLIT_ASSET and self.MERGER_ASSET had splits/mergers
      # on 1/6 and 1/7
  
      jan5 = pd.Timestamp("2015-01-05", tz="UTC")
  
      for asset in [self.SPLIT_ASSET, self.MERGER_ASSET]:
          # before any of the adjustments, 1/4 and 1/5
          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([np.nan, 8389]), 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]
  
          # Value from 1/5 should be quartered
          np.testing.assert_array_equal(
              [
                  2097.25,
                  # Split occurs. The value of the thousands place should
                  # match.
                  2004,
              ],
              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(
              [1048.625, 1194.50, 1004.0], 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
          np.testing.assert_array_equal([1389, 1009], 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 3 for calling the MinuteEquityHistoryTestCase obj's underlying member method code with example usage: obj.test_daily_splits_and_mergers() without return types