class_docstr: Tests for the `ASHABracket` class.
class_docstr_tok: ["Tests","for","the","`","ASHABracket","`","class","."]
docstr: Check if a valid modified candidate is returned by update_rungs.
code: def test_update_rungs_return_candidate(
      self, asha: ASHA, bracket: ASHABracket, rung_1: RungDict
  ):
      """Check if a valid modified candidate is returned by update_rungs."""
      assert bracket.owner is asha
      bracket.rungs[1] = rung_1
      trial = create_trial_for_hb((3, 0.0), 0.0)
  
      candidate = bracket.promote(1)[0]
  
      trial_id = asha.get_id(trial, ignore_fidelity=True)
      assert trial_id in bracket.rungs[1]["results"]
      assert (
          bracket.rungs[1]["results"][trial_id][1].params
          == trial.params
      )
      assert candidate.params["epoch"] == 9
  
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 10 for calling the TestASHABracket obj's underlying member method code with example usage: obj.test_update_rungs_return_candidate(asha, bracket, rung_1) without return types