Amazon interview question

Classification scenario: Given a data set, write a function to return X_train, Y_train, X_val , Y_val.