 y_name=&#34;y_train&#34;)

    if x_test is None or y_test is None:
        x_train, x_test, y_train, y_test = train_test_split(
            x_train, y_train, test_size=val_pct, random_state=random_state
        )
    else:
        U.check_array(x_test, y=y_test, X_name=&#34;x_test&#34;, y_name=&#34;y_test&#34;)

    # removed as TextPreprocessor now handles this.
    # if isinstance(y_train[0], str):
    # if not isinstance(y_test[0], str):
    # raise ValueError(&#39;y_train contains strings, but y_test 