code: def test_history_window_before_first_trading_day(self):
      # trading_start is 2/3/2014
      # get a history window that starts before that, and ends after that
      second_day = self.trading_calendar.next_session_label(
          self.TRADING_START_DT
      )
  
      exp_msg = (
          "History window extends before 2014-01-03. To use this history "
          "window, start the backtest on or after 2014-01-09."
      )
  
      with self.assertRaisesRegexp(
          HistoryWindowStartsBeforeData, exp_msg
      ):
          self.data_portal.get_history_window(
              [self.ASSET1],
              second_day,
              4,
              "1d",
              "price",
              "daily",
          )[self.ASSET1]
  
      with self.assertRaisesRegexp(
          HistoryWindowStartsBeforeData, exp_msg
      ):
          self.data_portal.get_history_window(
              [self.ASSET1],
              second_day,
              4,
              "1d",
              "volume",
              "daily",
          )[self.ASSET1]
  
      # Use a minute to force minute mode.
      first_minute = self.trading_calendar.schedule.market_open[
          self.TRADING_START_DT
      ]
  
      with self.assertRaisesRegexp(
          HistoryWindowStartsBeforeData, exp_msg
      ):
          self.data_portal.get_history_window(
              [self.ASSET2],
              first_minute,
              4,
              "1d",
              "close",
              "daily",
          )[self.ASSET2]
  
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 DailyEquityHistoryTestCase obj's underlying member method code with example usage: obj.test_history_window_before_first_trading_day() without return types