train_test extraction script