Write a function train_test_split(X, y, test_size) that splits data into training and testing sets based on a given proportion.