code: def test_write_attrs(self):
      result = self.bcolz_daily_bar_ctable
      expected_first_row = {
          "1": 0,
          "2": 5,  # Asset 1 has 5 trading days.
          "3": 12,  # Asset 2 has 7 trading days.
          "4": 33,  # Asset 3 has 21 trading days.
          "5": 44,  # Asset 4 has 11 trading days.
          "6": 49,  # Asset 5 has 5 trading days.
      }
      expected_last_row = {
          "1": 4,
          "2": 11,
          "3": 32,
          "4": 43,
          "5": 48,
          "6": 57,  # Asset 6 has 9 trading days.
      }
      expected_calendar_offset = {
          "1": 0,  # Starts on 6-01, 1st trading day of month.
          "2": 15,  # Starts on 6-22, 16th trading day of month.
          "3": 1,  # Starts on 6-02, 2nd trading day of month.
          "4": 0,  # Starts on 6-01, 1st trading day of month.
          "5": 9,  # Starts on 6-12, 10th trading day of month.
          "6": 10,  # Starts on 6-15, 11th trading day of month.
      }
      self.assertEqual(result.attrs["first_row"], expected_first_row)
      self.assertEqual(result.attrs["last_row"], expected_last_row)
      self.assertEqual(
          result.attrs["calendar_offset"],
          expected_calendar_offset,
      )
      cal = get_calendar(result.attrs["calendar_name"])
      first_session = Timestamp(
          result.attrs["start_session_ns"], tz="UTC"
      )
      end_session = Timestamp(result.attrs["end_session_ns"], tz="UTC")
      sessions = cal.sessions_in_range(first_session, end_session)
  
      assert_index_equal(self.sessions, sessions)
  
imports: from sys import maxsize
  import re
  from nose_parameterized import parameterized
  from numpy import arange, datetime64, nan
  from numpy.testing import assert_array_equal
  from pandas import DataFrame, Timestamp
  from pandas.util.testing import assert_index_equal
  from catalyst.data.us_equity_pricing import BcolzDailyBarReader, BcolzDailyBarWriter, NoDataBeforeDate, NoDataAfterDate
  from catalyst.pipeline.loaders.synthetic import OHLCV, asset_start, asset_end, expected_bar_value, expected_bar_values_2d, make_bar_data
  from catalyst.testing import seconds_to_timestamp
  from catalyst.testing.fixtures import WithAssetFinder, WithBcolzEquityDailyBarReader, WithTmpDir, WithTradingCalendars, CatalystTestCase
  from catalyst.utils.calendars import get_calendar
label_desc: Use image node_id 11 for calling the BcolzDailyBarTestCase obj's underlying member method code with example usage: obj.test_write_attrs() without return types