code: def _write(self, file, query_strategy, clf_factory):
      x = random_sklearn_dataset(20, 100)
      active_learner = get_initialized_active_learner(
          clf_factory, query_strategy, x
      )
      ind_initial = active_learner.indices_labeled
      ind_queried = active_learner.query()
  
      labels = np.random.randint(2, size=10)
      # fix the first two labels to guarantee the existence of both classes
      labels[0:2] = [0, 1]
  
      active_learner.update(labels)
      active_learner.save(file)
  
      return active_learner, ind_initial, ind_queried
  
file_path: small-text/tests/integration/small_text/test_serialization.py
imports: import unittest
  import tempfile
  import numpy
  from pathlib import Path
  from numpy.testing import assert_array_equal
  from small_text.active_learner import PoolBasedActiveLearner
  from small_text.classifiers import ConfidenceEnhancedLinearSVC, SklearnClassifierFactory
  from small_text.query_strategies import RandomSampling
  from tests.utils.datasets import random_sklearn_dataset
  from tests.utils.object_factory import get_initialized_active_learner
label_desc: Use image node_id 4 for calling the SerializationTest obj's underlying member method code with example usage: obj._write(file, query_strategy, clf_factory) and returns: active_learner,  ind_initial,  ind_queried