def confidence_interval_estimate(cross_val_result, key):
    """Returns 95% confidence interval estimates from cross_val results."""
    test_key = "test_" + key
    train_key = "train_" + key
    test_scores = cross_val_result[test_key]
    train_scores = cross_val_result[train_key]

    test_str = "Test {}: {:.2f} (+/- {:.2f})".format(
        key, test_scores.mean(), test_scores.std() * 1.96
    )
    train_str = "Train {}: {:.2f} (+/- {:.2f})".format(
        key, train_scores.mean(), train_scores.std() * 1.96
    )
    return test_str, train_str