def _load_instruments(self, market):
    fname = self._uri_inst.format(market)
    if (not os.path.exists(fname)):
        raise ValueError(('instruments not exists for market ' + market))
    _instruments = dict()
    with open(fname) as f:
        for line in f:
            inst_time = line.strip().split()
            inst = inst_time[0]
            if (len(inst_time) == 3):
                begin = inst_time[1]
                end = inst_time[2]
            elif (len(inst_time) == 5):
                begin = ((inst_time[1] + ' ') + inst_time[2])
                end = ((inst_time[3] + ' ') + inst_time[4])
            _instruments.setdefault(inst, []).append((pd.Timestamp(begin), pd.Timestamp(end)))
    return _instruments
def _load_instruments(self, market):
    fname = self._uri_inst.format(market)
    if (not os.path.exists(fname)):
        raise ValueError(('instruments not exists for market ' + market))
    _instruments = dict()
    with open(fname) as f:
        for line in f:
            inst_time = line.strip().split()
            inst = inst_time[0]
            if (len(inst_time) == 3):
                begin = inst_time[1]
                end = inst_time[2]
            elif (len(inst_time) == 5):
                begin = ((inst_time[1] + ' ') + inst_time[2])
                end = ((inst_time[3] + ' ') + inst_time[4])
            _instruments.setdefault(inst, []).append((pd.Timestamp(begin), pd.Timestamp(end)))
    return _instruments