How to obtain x_test and y_test from the following code
test_generator = tf.keras.preprocessing.image_dataset_from_directory(
data_dir2, labels ='inferred', label_mode='categorical',
#validation_split=0.2,
#subset="validation",
#labels='inferred',
seed=123,
image_size=(img_height, img_width),
batch_size=64)