def METHOD_NAME(monkeypatch, sort_by, expected):
    if parse_version(cleanlab.__version__) < parse_version("2.0"):
        def mock_get_noise_indices(*args, **kwargs):
            assert kwargs["sorted_index_method"] == expected[0]
            return []
        monkeypatch.setattr(
            "cleanlab.pruning.get_noise_indices",
            mock_get_noise_indices,
        )
    else:
        def mock_find_label_issues(*args, **kwargs):
            assert kwargs["return_indices_ranked_by"] == expected[1]
            return []
        monkeypatch.setattr(
            "cleanlab.filter.find_label_issues",
            mock_find_label_issues,
        )
    record = TextClassificationRecord(text="mock", prediction=[("mock", 0.1)], annotation="mock")
    find_label_errors(records=[record], sort_by=sort_by)