code: def test_history_in_initialize(self):
      algo_text = dedent(
          """\
              from catalyst.api import history
  
              def initialize(context):
                  history([1], 10, '1d', 'price')
  
              def handle_data(context, data):
                  pass
              """
      )
  
      start = pd.Timestamp("2014-04-05", tz="UTC")
      end = pd.Timestamp("2014-04-10", tz="UTC")
  
      sim_params = SimulationParameters(
          start_session=start,
          end_session=end,
          capital_base=float("1.0e5"),
          data_frequency="minute",
          emission_rate="daily",
          trading_calendar=self.trading_calendar,
      )
  
      test_algo = TradingAlgorithm(
          script=algo_text,
          data_frequency="minute",
          sim_params=sim_params,
          env=self.env,
      )
  
      with self.assertRaises(HistoryInInitialize):
          test_algo.initialize()
  
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 2 for calling the MinuteEquityHistoryTestCase obj's underlying member method code with example usage: obj.test_history_in_initialize() without return types