code: def test_bad_weight_ensemble_members_by_parameter_error():
      with pytest.raises(ValueError) 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)
          )
  
          _ = rank.get_label_quality_ensemble_scores(
              labels,
              pred_probs_list,
              weight_ensemble_members_by="not_a_real_method",  # this should raise ValueError
          )
  
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 8 for calling a global function with example usage: test_bad_weight_ensemble_members_by_parameter_error() without return types