code: def test_prepare_for_training_with_spark_nlp(self, request, records):
      records = request.getfixturevalue(records)
  
      ds = DatasetForTextClassification(records)
      df = ds.prepare_for_training("spark-nlp", train_size=1, seed=42)
  
      if ds[0].multi_label:
          column_names = ["id", "text", "labels"]
      else:
          column_names = ["id", "text", "label"]
  
      assert isinstance(df, pd.DataFrame)
      assert list(df.columns) == column_names
      assert len(df) == 2
  
      df_train, df_test = ds.prepare_for_training(
          "spark-nlp", train_size=0.5, seed=42
      )
      assert len(df_train) == 1
      assert len(df_test) == 1
      assert isinstance(df_train, pd.DataFrame)
      assert isinstance(df_test, pd.DataFrame)
      assert list(df_train.columns) == column_names
      assert list(df_test.columns) == column_names
  
imports: import copy
  import os
  import sys
  from time import sleep
  import datasets
  import pandas
  import pytest
  import spacy
  from argilla.client.datasets import DatasetBase, DatasetForText2Text, DatasetForTextClassification, DatasetForTokenClassification, WrongRecordTypeError, read_datasets, read_pandas
  from argilla.client.models import Text2TextRecord, TextClassificationRecord, TokenClassificationRecord
  from argilla.datasets import TextClassificationSettings
label_desc: Use image node_id 10 for calling the TestDatasetForTextClassification obj's underlying member method code with example usage: obj.test_prepare_for_training_with_spark_nlp(request, records) without return types