code: def test_rare_class():
      labels = np.array(
          [
              [1, np.NaN, 2],
              [1, 1, 0],
              [2, 2, 0],
              [np.NaN, 2, 2],
              [np.NaN, 2, 1],
              [np.NaN, 2, 2],
          ]
      )
  
      pred_probs = np.array(
          [
              [0.4, 0.4, 0.2],
              [0.3, 0.6, 0.1],
              [0.05, 0.2, 0.75],
              [0.1, 0.4, 0.5],
              [0.2, 0.4, 0.4],
              [0.2, 0.4, 0.4],
          ]
      )
  
      consensus_label = get_majority_vote_label(labels)
      multiannotator_dict = get_label_quality_multiannotator(
          labels, pred_probs
      )
  
      pred_probs_missing = np.array(
          [
              [0.8, 0.2],
              [0.6, 0.14],
              [0.95, 0.05],
              [0.5, 0.5],
              [0.4, 0.6],
              [0.4, 0.6],
          ]
      )
  
      try:
          multiannotator_dict = get_label_quality_multiannotator(
              labels, pred_probs_missing
          )
      except ValueError as e:
          assert "pred_probs must have at least 3 columns" 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 12 for calling a global function with example usage: test_rare_class() without return types