class_docstr: Tests for `BracketEVES` class..
class_docstr_tok: ["Tests","for","`","BracketEVES","`","class",".."]
docstr: Test that correct trial is promoted.
code: def test_mutate_trials(self, bracket: BracketEVES, rung_3: RungDict):
      """Test that correct trial is promoted."""
      red_team = [0, 2]
      blue_team = [0, 2]
      population_range = 4
      rung_trials = list(rung_3["results"].values())
      for trial_index in range(4):
          objective, trial = rung_trials[trial_index]
  
          # bracket.eves.performance[trial_index] = objective
          for ith_dim in [1, 2]:
              bracket.owner.population[ith_dim][
                  trial_index
              ] = trial.params[bracket.owner.space[ith_dim].name]
  
      trials, nums_all_equal = bracket._mutate_population(
          red_team,
          blue_team,
          rung_3["results"],
          population_range,
          fidelity=2,
      )
      assert trials[0].params == {
          "epoch": 2,
          "lr": 1.0,
          "weight_decay": 1.0,
      }
      assert trials[1].params == {
          "epoch": 2,
          "lr": 1.0 / 2,
          "weight_decay": 1.0 / 4,
      }
      assert (nums_all_equal == 0).all()
  
imports: from __future__ import annotations
  import copy
  from typing import ClassVar
  import numpy
  import pytest
  from test_hyperband import create_rung_from_points, create_trial_for_hb
  from orion.algo.evolution_es import BracketEVES, BudgetTuple, EvolutionES, compute_budgets
  from orion.algo.hyperband import RungDict
  from orion.algo.space import Fidelity, Real, Space
  from orion.core.utils import backward
  from orion.core.worker.trial import Trial
  from orion.testing.algo import BaseAlgoTests, TestPhase, _are_equal
  from orion.testing.trial import create_trial
label_desc: Use image node_id 4 for calling the TestBracketEVES obj's underlying member method code with example usage: obj.test_mutate_trials(bracket, rung_3) without return types