code: def test_base_token_classification(
      framework, dataset_token_classification
  ):
      def _init_trainer(_framework) -> None:
          trainer = ArgillaTrainer(
              dataset_token_classification, framework=_framework
          )
          assert trainer._split_applied is False
          assert trainer._multi_label is False
          assert trainer._trainer._eval_dataset is None
          assert (
              trainer._rg_dataset_type is DatasetForTokenClassification
          )
          assert (
              trainer._trainer._record_class
              is TokenClassificationRecord
          )
  
      if framework == "setfit":
          with pytest.raises(
              NotImplementedError,
              match="SetFit only supports the `TextClassification` task.",
          ):
              _init_trainer(framework)
      else:
          _init_trainer(framework)
  
file_path: argilla/tests/integration/training/test_base.py
imports: import pytest
  from argilla.client.datasets import DatasetForTextClassification, DatasetForTokenClassification
  from argilla.client.models import TextClassificationRecord, TokenClassificationRecord
  from argilla.training import ArgillaTrainer
label_desc: Use image node_id 4 for calling a global function with example usage: test_base_token_classification(framework, dataset_token_classification) without return types