code: def test_from_arrays_test_data(self):
      texts = np.array([f"data {i}" for i in range(10)])
      labels = random_labels(10, 3, multi_label=True)
  
      vectorizer = TfidfVectorizer()
      # usually we would not call fit here but a fitted vocab is required
      # before calling transform()
      vectorizer.fit(texts)
  
      with patch.object(
          vectorizer, "transform", wraps=vectorizer.transform
      ) as transform_spy:
          dataset = SklearnDataset.from_arrays(
              texts, labels, vectorizer, train=False
          )
  
          self.assertEqual(10, len(dataset))
          assert_csr_matrix_equal(labels, dataset.y)
          is_fitted = [
              v
              for v in vars(vectorizer)
              if v.endswith("_") and not v.startswith("__")
          ]
          self.assertTrue(is_fitted)
  
          transform_spy.assert_called_with(texts)
  
imports: import unittest
  import numpy
  from numpy.testing import assert_array_equal
  from sklearn.feature_extraction.text import TfidfVectorizer
  from unittest.mock import patch
  from small_text.data import SklearnDataset, TextDataset
  from tests.utils.datasets import random_labeling, random_labels
  from tests.utils.testing import assert_csr_matrix_equal
label_desc: Use image node_id 3 for calling the SklearnDatasetConstructionMultiLabelTest obj's underlying member method code with example usage: obj.test_from_arrays_test_data() without return types