def train_test_split(features, target, split_ts):
    """
    Splits all provided TimeSeries instances into train and test sets according to the provided timestamp.

    :param features: Feature TimeSeries instances to be split.
    :param target: Target TimeSeries instance to be split.
    :return: 4-tuple of the form (train_features, train_target, test_features, test_target)
    """

    # split features
    train_features = []
    test_features = []
    for feature in features:
        train_feature, test_feature = feature.split_after(split_ts)
        train_features.append(train_feature)
        test_features.append(test_feature)

    # split target
    train_target, test_target = target.split_after(split_ts)

    return (train_features, train_target, test_features, test_target)