code: def test_candidates_better_than_dummy_multiobjective(
      builder: EnsembleBuilder,
      make_run: Callable[..., Run],
  ) -> None:
      """
      Expects
      -------
      * For a run to be considered a candidate, it must be better than the best dummy for
        any one of the objectives.
      """
      x = make_scorer("x", lambda: None)
      y = make_scorer("y", lambda: None)
  
      # The will be one best dummy per objective achieving a loss of 1
      # You can think of this as a joint filter [1, 1] over "x", "y" losses
      dummies = [
          make_run(dummy=True, losses={"x": 1, "y": 500}),
          make_run(dummy=True, losses={"x": 500, "y": 1}),
      ]
  
      # Clearly better on both objectives
      good_runs = [make_run(losses={"x": 0, "y": 0}) for _ in range(5)]
  
      # Worse on both
      badd_runs = [make_run(losses={"x": 2, "y": 2}) for _ in range(5)]
  
      # Better on 1 objective but worse on the other
      may1_runs = [make_run(losses={"x": 2, "y": 0}) for _ in range(5)]
      may2_runs = [make_run(losses={"x": 0, "y": 2}) for _ in range(5)]
  
      # Better on 1 objective but equal one the other
      may3_runs = [make_run(losses={"x": 1, "y": 0}) for _ in range(5)]
      may4_runs = [make_run(losses={"x": 0, "y": 1}) for _ in range(5)]
  
      # Equal on 1 objective but worse one the other
      may5_runs = [make_run(losses={"x": 1, "y": 2}) for _ in range(5)]
      may6_runs = [make_run(losses={"x": 2, "y": 1}) for _ in range(5)]
  
      expected_candidates = [
          *good_runs,
          *may1_runs,
          *may2_runs,
          *may3_runs,
          *may4_runs,
      ]
  
      expected_discarded = [
          *badd_runs,
          *may5_runs,
          *may6_runs,
      ]
  
      runs = expected_candidates + expected_discarded
  
      candidates, discarded = builder.candidate_selection(
          runs, dummies, better_than_dummy=True, metrics=[x, y]
      )
  
      # No duplicates
      assert len(candidates) == len(set(candidates))
  
      assert set(candidates) == set(expected_candidates)
      assert discarded == set(expected_discarded)
  
imports: from __future__ import annotations
  from typing import Callable
  import random
  import time
  from pathlib import Path
  import numpy
  from autosklearn.automl_common.common.utils.backend import Backend
  from autosklearn.ensemble_building import EnsembleBuilder, Run
  from autosklearn.metrics import Scorer, accuracy, make_scorer
  from autosklearn.util.functional import bound, pairs
  import pytest
  from pytest_cases import fixture, parametrize
  from unittest.mock import Mock, patch
  from test.conftest import DEFAULT_SEED
  from test.fixtures.metrics import acc_with_X_data
label_desc: Use image node_id 12 for calling a global function with example usage: test_candidates_better_than_dummy_multiobjective(builder, make_run) without return types