class_docstr: Tests for the `ASHABracket` class.
class_docstr_tok: ["Tests","for","the","`","ASHABracket","`","class","."]
docstr: Check if many valid modified candidate is returned by update_rungs.
code: def test_update_rungs_return_candidates(
      self,
      asha: ASHA,
      bracket: ASHABracket,
      big_rung_0: RungDict,
      big_rung_1: RungDict,
  ):
      """Check if many valid modified candidate is returned by update_rungs."""
      assert bracket.owner is asha
  
      bracket.rungs[0] = big_rung_0
      bracket.rungs[1] = big_rung_1
  
      candidates = bracket.promote(100)
  
      assert len(candidates) == 2 + 3 * 3
      assert (
          sum(
              1
              for trial in candidates
              if trial.params[asha.fidelity_index] == 9
          )
          == 2
      )
      assert (
          sum(
              1
              for trial in candidates
              if trial.params[asha.fidelity_index] == 3
          )
          == 3 * 3
      )
  
      candidates = bracket.promote(3)
  
      assert len(candidates) == 2 + 1
      assert (
          sum(
              1
              for trial in candidates
              if trial.params[asha.fidelity_index] == 9
          )
          == 2
      )
      assert (
          sum(
              1
              for trial in candidates
              if trial.params[asha.fidelity_index] == 3
          )
          == 1
      )
  
imports: from __future__ import annotations
  import hashlib
  import logging
  from typing import ClassVar
  import numpy
  import pytest
  from test_hyperband import compare_registered_trial, create_rung_from_points, create_trial_for_hb, force_observe
  from orion.algo.asha import ASHA, ASHABracket, compute_budgets
  from orion.algo.hyperband import RungDict
  from orion.algo.space import Fidelity, Integer, Real, Space
  from orion.core.worker.primary_algo import SpaceTransform
  from orion.testing.algo import BaseAlgoTests, TestPhase
  from orion.testing.trial import create_trial
label_desc: Use image node_id 11 for calling the TestASHABracket obj's underlying member method code with example usage: obj.test_update_rungs_return_candidates(asha, bracket, big_rung_0, big_rung_1) without return types