class_docstr: (T)ime-(S)eries Dataset (H)andler
  
  
  Convert the tabular data to Time-Series data
  
  Requirements analysis
  
  The typical workflow of a user to get time-series data for an sample
  - process features
  - slice proper data from data handler:  dimension of sample <feature, >
  - Build relation of samples by <time, instrument> index
      - Be able to sample times series of data <timestep, feature>
      - It will be better if the interface is like "torch.utils.data.Dataset"
  - User could build customized batch based on the data
      - The dimension of a batch of data <batch_idx, feature, timestep>
class_docstr_tok: ["(","T",")","ime-","(","S",")","eries","Dataset","(","H",")","andler","Convert","the","tabular","data","to","Time-Series","data","Requirements","analysis","The","typical","workflow","of","a","user","to","get","time-series","data","for","an","sample","-","process","features","-","slice","proper","data","from","data","handler",":","dimension","of","sample","<","feature",",",">","-","Build","relation","of","samples","by","<","time",",","instrument",">","index","-","Be","able","to","sample","times","series","of","data","<","timestep",",","feature",">","-","It","will","be","better","if","the","interface","is","like","``","torch.utils.data.Dataset","''","-","User","could","build","customized","batch","based","on","the","data","-","The","dimension","of","a","batch","of","data","<","batch_idx",",","feature",",","timestep",">"]
code: def setup_data(self, **kwargs):
      super().setup_data(**kwargs)
      # make sure the calendar is updated to latest when loading data from new config
      cal = (
          self.handler.fetch(col_set=self.handler.CS_RAW)
          .index.get_level_values("datetime")
          .unique()
      )
      self.cal = sorted(cal)
  
imports: from ...utils.serial import Serializable
  from typing import Callable, Union, List, Tuple, Dict, Text, Optional
  from ...utils import init_instance_by_config, np_ffill, time_to_slc_point
  from ...log import get_module_logger
  from .handler import DataHandler, DataHandlerLP
  from copy import copy, deepcopy
  from inspect import getfullargspec
  import pandas
  import numpy
  import bisect
  from ...utils import lazy_sort_index
  from .utils import get_level_index
label_desc: Use image node_id 3 for calling the TSDatasetH obj's underlying member method code with example usage: obj.setup_data() without return types