code: def test_prepare_for_training_train_test_splits(
      self, monkeypatch, singlelabel_textclassification_records
  ):
      monkeypatch.setattr(
          "argilla.client.datasets.DatasetBase._RECORD_TYPE",
          TextClassificationRecord,
      )
      temp_records = copy.deepcopy(
          singlelabel_textclassification_records
      )
      settings = TextClassificationSettings(["a", "b", "c"])
      ds = DatasetBase(temp_records)
  
      with pytest.raises(
          AssertionError,
          match="`train_size` and `test_size` must be larger than 0.",
      ):
          ds.prepare_for_training(train_size=-1, settings=settings)
  
      with pytest.raises(
          AssertionError,
          match="`train_size` and `test_size` must sum to 1.",
      ):
          ds.prepare_for_training(
              test_size=0.1, train_size=0.6, settings=settings
          )
  
      for rec in ds:
          rec.annotation = None
      with pytest.raises(
          AssertionError, match="Dataset has no annotations."
      ):
          ds.prepare_for_training(settings=settings)
  
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 TestDatasetBase obj's underlying member method code with example usage: obj.test_prepare_for_training_train_test_splits(monkeypatch, singlelabel_textclassification_records) without return types