code: def test_fit_with_non_default_settings(self):
      # in particularly we test max_seq_len and mini_batch_size here
      mini_batch_size = 8
      max_seq_len = 32
      device = "cuda:0"
      classification_kwargs = {
          "use_differentiable_head": self.use_differentiable_head,
          "multi_label": self.multi_label,
          "device": device,
          "mini_batch_size": mini_batch_size,
          "max_seq_len": max_seq_len,
      }
      setfit_model_args = SetFitModelArguments(
          "sentence-transformers/paraphrase-MiniLM-L3-v2"
      )
      clf_factory = SetFitClassificationFactory(
          setfit_model_args,
          self.num_classes,
          classification_kwargs=classification_kwargs,
      )
  
      train_set = twenty_news_text(
          30, num_classes=self.num_classes, multi_label=self.multi_label
      )
  
      clf = clf_factory.new()
  
      with patch(
          "small_text.integrations.transformers.classifiers.setfit.SetFitTrainer",
          autospec=True,
          create=True,
      ) as setfit_trainer_mock:
          clf.fit(train_set)
  
          self.assertEqual(1, setfit_trainer_mock.call_count)
          self.assertEqual(
              mini_batch_size,
              setfit_trainer_mock.call_args_list[0].kwargs[
                  "batch_size"
              ],
          )
  
          train_mock = setfit_trainer_mock.return_value.train
          self.assertEqual(1, train_mock.call_count)
          self.assertEqual(
              max_seq_len,
              train_mock.call_args_list[0].kwargs["max_length"],
          )
  
imports: import unittest
  import pytest
  import numpy
  from unittest.mock import patch
  from scipy.sparse import issparse
  from small_text.data.datasets import TextDataset
  from small_text.exceptions import UnsupportedOperationException
  from small_text.integrations.pytorch.exceptions import PytorchNotFoundError
  from sklearn.utils.validation import check_is_fitted
  from tests.utils.datasets import twenty_news_text
label_desc: Use image node_id 5 for calling the _ClassificationTest obj's underlying member method code with example usage: obj.test_fit_with_non_default_settings() without return types