code: def test_bad_rank_by_parameter_error():
      with pytest.raises(ValueError) as e:
          _ = rank.order_label_issues(
              label_issues_mask=data["label_errors_mask"],
              labels=data["labels"],
              pred_probs=data["pred_probs"],
              rank_by="not_a_real_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 4 for calling a global function with example usage: test_bad_rank_by_parameter_error() without return types