code: def _test_daily_history_blended(self):
      # daily history windows that end mid-day use minute values for the
      # last day
  
      # January 2015 has both daily and minute data for ASSET2
      day = pd.Timestamp("2015-01-07", tz="UTC")
      minutes = self.trading_calendar.minutes_for_session(day)
  
      equity_cal = self.trading_calendars[Equity]
      equity_minutes = equity_cal.minutes_for_session(day)
      equity_open, equity_close = equity_minutes[0], equity_minutes[-1]
  
      # minute data, baseline:
      # Jan 5: 2 to 391
      # Jan 6: 392 to 781
      # Jan 7: 782 to 1172
      for minute in minutes:
          idx = equity_minutes.searchsorted(min(minute, equity_close))
  
          for field in ALL_FIELDS:
              window = self.data_portal.get_history_window(
                  [self.ASSET2],
                  minute,
                  3,
                  "1d",
                  field,
                  "minute",
              )[self.ASSET2]
  
              self.assertEqual(len(window), 3)
  
              if field == "open":
                  self.assertEqual(window[0], 3)
                  self.assertEqual(window[1], 393)
              elif field == "high":
                  self.assertEqual(window[0], 393)
                  self.assertEqual(window[1], 783)
              elif field == "low":
                  self.assertEqual(window[0], 1)
                  self.assertEqual(window[1], 391)
              elif field == "close":
                  self.assertEqual(window[0], 391)
                  self.assertEqual(window[1], 781)
              elif field == "volume":
                  self.assertEqual(window[0], 7663500)
                  self.assertEqual(window[1], 22873500)
  
              last_val = -1
  
              if minute < equity_open:
                  # If before the equity calendar open, we don't yet
                  # have data (but price is forward-filled).
                  if field == "volume":
                      last_val = 0
                  elif field == "price":
                      last_val = window[1]
                  else:
                      last_val = nan
              elif field == "open":
                  last_val = 783
              elif field == "high":
                  # since we increase monotonically, it's just the last
                  # value
                  last_val = 784 + idx
              elif field == "low":
                  # since we increase monotonically, the low is the first
                  # value of the day
                  last_val = 781
              elif field == "close" or field == "price":
                  last_val = 782 + idx
              elif field == "volume":
                  # for volume, we sum up all the minutely volumes so far
                  # today
  
                  last_val = sum(
                      np.array(range(782, 782 + idx + 1)) * 100
                  )
  
              np.testing.assert_equal(window[-1], last_val)
  
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 17 for calling the MinuteEquityHistoryTestCase obj's underlying member method code with example usage: obj._test_daily_history_blended() without return types