code: def perform_active_learning(
      active_learner, train, indices_labeled, test, num_iterations
  ):
      # Perform 10 iterations of active learning...
      for i in range(num_iterations):
          # ...where each iteration consists of labelling 20 samples
          indices_queried = active_learner.query(num_samples=1000)
  
          # Simulate user interaction here. Replace this for real-world usage.
          y = train.y[indices_queried]
  
          # Return the labels for the current query to the active learner.
          active_learner.update(y)
  
          print(
              "Iteration #{:d} ({} samples)".format(
                  i, len(active_learner.indices_labeled)
              )
          )
          evaluate_multi_label(
              active_learner,
              train[active_learner.indices_labeled],
              test,
          )
  
imports: from transformers import AutoTokenizer
  from small_text import ActiveLearnerException, EmptyPoolException, PoolBasedActiveLearner, PoolExhaustedException, RandomSampling, TransformerBasedClassificationFactory, TransformerModelArguments, list_to_csr, random_initialization_stratified
  from examplecode.data.example_data_multilabel import get_train_test
  from examplecode.data.example_data_transformers import preprocess_data
  from examplecode.shared import evaluate_multi_label
label_desc: Use image node_id 2 for calling a global function with example usage: perform_active_learning(active_learner, train, indices_labeled, test, num_iterations) without return types