code: def test_next_prev_minute(self):
      all_minutes = self.calendar.all_minutes
  
      # test 20,000 minutes because it takes too long to do the rest.
      for idx, minute in enumerate(all_minutes[1:20000]):
          self.assertEqual(
              all_minutes[idx + 2], self.calendar.next_minute(minute)
          )
  
          self.assertEqual(
              all_minutes[idx], self.calendar.previous_minute(minute)
          )
  
      # test a couple of non-market minutes
      if self.GAPS_BETWEEN_SESSIONS:
          for open_minute in self.answers.market_open[1:]:
              hour_before_open = open_minute - self.one_hour
              self.assertEqual(
                  open_minute,
                  self.calendar.next_minute(hour_before_open),
              )
  
          for close_minute in self.answers.market_close[1:]:
              hour_after_close = close_minute + self.one_hour
              self.assertEqual(
                  close_minute,
                  self.calendar.previous_minute(hour_after_close),
              )
  
imports: from datetime import time
  from os.path import abspath, dirname, join
  from unittest import TestCase
  import numpy
  import pandas
  from nose_parameterized import parameterized
  from pandas import read_csv
  from pandas.tslib import Timedelta
  from pandas.util.testing import assert_index_equal
  from pytz import timezone
  from toolz import concat
  from catalyst.errors import CalendarNameCollision, InvalidCalendarName
  from catalyst.testing.predicates import assert_equal
  from catalyst.utils.calendars import deregister_calendar, get_calendar, register_calendar
  from catalyst.utils.calendars.calendar_utils import _default_calendar_aliases, _default_calendar_factories, register_calendar_type
  from catalyst.utils.calendars.trading_calendar import days_at_time, TradingCalendar
label_desc: Use image node_id 8 for calling the ExchangeCalendarTestBase obj's underlying member method code with example usage: obj.test_next_prev_minute() without return types