code: def test_ensemble_scoring_func(
      method, adjust_pred_probs, weight_ensemble_members_by
  ):
      labels = data["labels"]
      pred_probs = data["pred_probs"]
  
      # check if method supports adjust_pred_probs
      # do not run the test below if the method does not support adjust_pred_probs
      # confidence_weighted_entropy scoring method does not support adjust_pred_probs
      if not (
          adjust_pred_probs == True
          and method == "confidence_weighted_entropy"
      ):
          # 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)
          )
  
          # get label quality score with single pred_probs
          label_quality_scores = rank.get_label_quality_scores(
              labels,
              pred_probs,
              method=method,
              adjust_pred_probs=adjust_pred_probs,
          )
  
          # get ensemble label quality score
          label_quality_scores_ensemble = (
              rank.get_label_quality_ensemble_scores(
                  labels,
                  pred_probs_list,
                  method=method,
                  adjust_pred_probs=adjust_pred_probs,
                  weight_ensemble_members_by=weight_ensemble_members_by,
              )
          )
  
          # if all pred_probs in the list are the same, then ensemble score should be the same as the regular score
          # account for small precision error due to averaging of scores
          assert (
              abs(label_quality_scores - label_quality_scores_ensemble)
              < 1e-6
          ).all(), f"Test failed with scoring method: {method}"
  
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 7 for calling a global function with example usage: test_ensemble_scoring_func(method, adjust_pred_probs, weight_ensemble_members_by) without return types