code: def test_minute_different_lifetimes(self):
      cal = self.trading_calendar
      equity_cal = self.trading_calendars[Equity]
  
      # at trading start, only asset1 existed
      day = self.trading_calendar.next_session_label(
          self.TRADING_START_DT
      )
  
      # Range containing 100 equity minutes, possibly more on other
      # calendars (i.e. futures).
      window_start = pd.Timestamp("2014-01-03 19:22", tz="UTC")
      window_end = pd.Timestamp("2014-01-06 14:31", tz="UTC")
      bar_count = len(cal.minutes_in_range(window_start, window_end))
  
      equity_cal = self.trading_calendars[Equity]
      first_equity_open, _ = equity_cal.open_and_close_for_session(day)
  
      asset1_minutes = equity_cal.minutes_for_sessions_in_range(
          self.ASSET1.start_date, self.ASSET1.end_date
      )
      asset1_idx = asset1_minutes.searchsorted(first_equity_open)
  
      window = self.data_portal.get_history_window(
          [self.ASSET1, self.ASSET2],
          first_equity_open,
          bar_count,
          "1m",
          "close",
          "minute",
      )
  
      expected = range(asset1_idx - 97, asset1_idx + 3)
  
      # First 99 bars occur on the previous day,
      np.testing.assert_array_equal(
          window[self.ASSET1][:99],
          expected[:99],
      )
      # Any interim bars are not active equity minutes, so should all
      # be nan.
      np.testing.assert_array_equal(
          window[self.ASSET1][99:-1],
          np.full(len(window) - 100, np.nan),
      )
      # Final bar in the window is the first equity bar of `day`.
      np.testing.assert_array_equal(
          window[self.ASSET1][-1:],
          expected[-1:],
      )
  
      # All NaNs for ASSET2, since it hasn't started yet.
      np.testing.assert_array_equal(
          window[self.ASSET2],
          np.full(len(window), np.nan),
      )
  
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 15 for calling the MinuteEquityHistoryTestCase obj's underlying member method code with example usage: obj.test_minute_different_lifetimes() without return types