class_docstr: Class capable of writing daily OHLCV data to disk in a format that can
  be read efficiently by BcolzDailyOHLCVReader.
  
  Parameters
  ----------
  filename : str
      The location at which we should write our output.
  calendar : zipline.utils.calendar.trading_calendar
      Calendar to use to compute asset calendar offsets.
  start_session: pd.Timestamp
      Midnight UTC session label.
  end_session: pd.Timestamp
      Midnight UTC session label.
  
  See Also
  --------
  zipline.data.bcolz_daily_bars.BcolzDailyBarReader
class_docstr_tok: ["Class","capable","of","writing","daily","OHLCV","data","to","disk","in","a","format","that","can","be","read","efficiently","by","BcolzDailyOHLCVReader",".","Parameters","--","--","--","--","--","filename",":","str","The","location","at","which","we","should","write","our","output",".","calendar",":","zipline.utils.calendar.trading_calendar","Calendar","to","use","to","compute","asset","calendar","offsets",".","start_session",":","pd.Timestamp","Midnight","UTC","session","label",".","end_session",":","pd.Timestamp","Midnight","UTC","session","label",".","See","Also","--","--","--","--","zipline.data.bcolz_daily_bars.BcolzDailyBarReader"]
code: def to_ctable(self, raw_data, invalid_data_behavior):
      if isinstance(raw_data, ctable):
          # we already have a ctable so do nothing
          return raw_data
  
      winsorise_uint32(raw_data, invalid_data_behavior, "volume", *OHLC)
      processed = (raw_data[list(OHLC)] * 1000).round().astype("uint32")
      dates = raw_data.index.values.astype("datetime64[s]")
      check_uint32_safe(dates.max().view(np.int64), "day")
      processed["day"] = dates.astype("uint32")
      processed["volume"] = raw_data.volume.astype("uint32")
      return ctable.fromdataframe(processed)
  
imports: from functools import partial
  import warnings
  from bcolz import carray, ctable
  import logbook
  import numpy
  from numpy import array, full, iinfo, nan
  from pandas import DatetimeIndex, NaT, read_csv, to_datetime, Timestamp
  from six import iteritems, viewkeys
  from toolz import compose
  from trading_calendars import get_calendar
  from zipline.data.session_bars import CurrencyAwareSessionBarReader
  from zipline.data.bar_reader import NoDataAfterDate, NoDataBeforeDate, NoDataOnDate
  from zipline.utils.functional import apply
  from zipline.utils.input_validation import expect_element
  from zipline.utils.numpy_utils import iNaT, float64_dtype, uint32_dtype
  from zipline.utils.memoize import lazyval
  from zipline.utils.cli import maybe_show_progress
  from ._equities import _compute_row_slices, _read_bcolz_data
label_desc: Use image node_id 7 for calling the BcolzDailyBarWriter obj's underlying member method code with example usage: obj.to_ctable(raw_data, invalid_data_behavior) and returns: ctable, raw_data