def train_test_split(time_series, test_size=0.5, train_size=0.5,
                     random_state=None):
    if len(time_series) <= 1:
        return time_series, []
    inds = np.arange(len(time_series))
    if isinstance(time_series[0].target, string_types):
        stratify = np.array([ts.target for ts in time_series])
    else:
        stratify = None
    train, test = sklearn_split(inds, test_size=test_size,
                                train_size=train_size,
                                random_state=random_state, stratify=stratify)
    return [time_series[i] for i in train], [time_series[j] for j in test]


# Keys=transform names, values=(transform function, [output names])
Returns a specific element from a query set.
dataset/ETHPy150Open cesium-ml/cesium/cesium/transformation.py/train_test_split--crossover with--dataset/ETHPy150Open adewes/blitzdb/blitzdb/queryset.py/QuerySet.__getitem__