code: def test_custom_weights():
      with pytest.raises(AssertionError) as e:
          labels = data["labels"]
          pred_probs = data["pred_probs"]
  
          # baseline scenario where all the pred_probs are the same in the ensemble list
          num_repeat = 3
          pred_probs_list = list(
              np.repeat([pred_probs], num_repeat, axis=0)
          )
  
          # baseline scenario where custom_weights are uniform
          custom_weights = np.ones(num_repeat) / 3
  
          scores_custom_weights = rank.get_label_quality_ensemble_scores(
              labels,
              pred_probs_list,
              weight_ensemble_members_by="custom",
              custom_weights=custom_weights,  # this should raise AssertionError
          )
  
          scores_uniform_weights = (
              rank.get_label_quality_ensemble_scores(
                  labels,
                  pred_probs_list,
                  weight_ensemble_members_by="uniform",
              )
          )
  
          # if custom_weights are uniform, then it should be the same as using weight_ensemble_members_by="uniform"
          assert (scores_custom_weights == scores_uniform_weights).all()
  
imports: import numpy
  import pytest
  from cleanlab import rank
  from cleanlab.internal.label_quality_utils import _subtract_confident_thresholds
  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 import outlier
  from sklearn.neighbors import NearestNeighbors
label_desc: Use image node_id 9 for calling a global function with example usage: test_custom_weights() without return types