code: def test_minute_sunday_midnight(self):
      # Most trading calendars aren't open at midnight on Sunday.
      sunday_midnight = pd.Timestamp("2015-01-09", tz="UTC")
  
      # Find the closest prior minute when the trading calendar was
      # open (note that if the calendar is open at `sunday_midnight`,
      # this will be `sunday_midnight`).
      trading_minutes = self.trading_calendar.all_minutes
      last_minute = trading_minutes[trading_minutes <= sunday_midnight][
          -1
      ]
  
      sunday_midnight_bar_data = self.create_bardata(
          lambda: sunday_midnight
      )
      last_minute_bar_data = self.create_bardata(lambda: last_minute)
  
      # Ensure that we get the same results at midnight on Sunday as
      # the last open minute.
      with handle_non_market_minutes(sunday_midnight_bar_data):
          for field in ALL_FIELDS:
              np.testing.assert_array_equal(
                  sunday_midnight_bar_data.history(
                      self.ASSET2,
                      field,
                      30,
                      "1m",
                  ),
                  last_minute_bar_data.history(
                      self.ASSET2, field, 30, "1m"
                  ),
              )
  
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 7 for calling the MinuteEquityHistoryTestCase obj's underlying member method code with example usage: obj.test_minute_sunday_midnight() without return types