code: def test_single_label_active_learning():
      labels = np.array(small_data["complete_labels"])
      labels_unlabeled = small_data["true_labels_train_unlabeled"]
      pred_probs = small_data["pred_probs_complete"]
      pred_probs_unlabeled = small_data["pred_probs_unlabeled"]
  
      assert len(labels) == 15
  
      # test 5 rounds of active learning
      for i in range(5):
          (
              active_learning_scores,
              active_learning_scores_unlabeled,
          ) = get_active_learning_scores(
              labels, pred_probs, pred_probs_unlabeled
          )
  
          min_ind = np.argmin(active_learning_scores_unlabeled)
  
          labels = np.append(labels, labels_unlabeled[min_ind]).reshape(
              -1, 1
          )
          pred_probs = np.append(
              pred_probs,
              pred_probs_unlabeled[min_ind].reshape(1, -1),
              axis=0,
          )
          labels_unlabeled = np.delete(labels_unlabeled, min_ind)
          pred_probs_unlabeled = np.delete(
              pred_probs_unlabeled, min_ind, axis=0
          )
  
      assert len(labels) == 20
  
      # make sure error is thrown if labels are not 2D
      labels_flat = np.array(small_data["complete_labels"]).reshape(
          1, -1
      )
      try:
          (
              active_learning_scores,
              active_learning_scores_unlabeled,
          ) = get_active_learning_scores(
              labels, pred_probs, pred_probs_unlabeled
          )
      except ValueError as e:
          assert (
              "labels_multiannotator must be a 2D array or dataframe"
              in str(e)
          )
  
imports: import numpy
  import pytest
  from copy import deepcopy
  from cleanlab.benchmarking.noise_generation import generate_noise_matrix_from_trace
  from cleanlab.benchmarking.noise_generation import generate_noisy_labels
  from cleanlab import count
  from cleanlab.multiannotator import get_label_quality_multiannotator, get_label_quality_multiannotator_ensemble, get_active_learning_scores, get_active_learning_scores_ensemble, get_majority_vote_label, convert_long_to_wide_dataset
  from cleanlab.internal.multiannotator_utils import format_multiannotator_labels
  import pandas
  from sklearn.linear_model import LogisticRegression
label_desc: Use image node_id 9 for calling a global function with example usage: test_single_label_active_learning() without return types