code: def test_open_and_close_for_session(self):
      for index, row in self.answers.iterrows():
          session_label = row.name
          open_answer = row.iloc[0]
          close_answer = row.iloc[1]
  
          (
              found_open,
              found_close,
          ) = self.calendar.open_and_close_for_session(session_label)
  
          # Test that the methods for just session open and close produce the
          # same values as the method for getting both.
          alt_open = self.calendar.session_open(session_label)
          self.assertEqual(alt_open, found_open)
  
          alt_close = self.calendar.session_close(session_label)
          self.assertEqual(alt_close, found_close)
  
          self.assertEqual(open_answer, found_open)
          self.assertEqual(close_answer, found_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 20 for calling the ExchangeCalendarTestBase obj's underlying member method code with example usage: obj.test_open_and_close_for_session() without return types