class_docstr: Tests for the algo Hyperband.
class_docstr_tok: ["Tests","for","the","algo","Hyperband","."]
docstr: Check that a point is registered inside the bracket.
docstr_tok: ["Check","that","a","point","is","registered","inside","the","bracket","."]
code: def test_register(
      self,
      hyperband: Hyperband,
      bracket: HyperbandBracket,
      rung_0: RungDict,
      rung_1: RungDict,
  ):
      """Check that a point is registered inside the bracket."""
      hyperband.brackets = [bracket]
      assert bracket.owner is hyperband
      bracket.rungs = [rung_0, rung_1]
      trial = create_trial_for_hb((1, 0.0), 0.0)
      trial_id = hyperband.get_id(trial, ignore_fidelity=True)
  
      hyperband.observe([trial])
  
      assert len(bracket.rungs[0])
      assert trial_id in bracket.rungs[0]["results"]
      assert bracket.rungs[0]["results"][trial_id][0] == 0.0
      assert (
          bracket.rungs[0]["results"][trial_id][1].params
          == trial.params
      )
  
imports: from __future__ import annotations
  import copy
  import logging
  import typing
  from typing import Any, ClassVar, Sequence
  import numpy
  import pytest
  from orion.algo.hyperband import BudgetTuple, Hyperband, HyperbandBracket, RungDict, compute_budgets
  from orion.algo.space import Fidelity, Integer, Real, Space
  from orion.core.utils.flatten import flatten
  from orion.core.worker.primary_algo import SpaceTransform
  from orion.core.worker.trial import Trial
  from orion.testing.algo import BaseAlgoTests, TestPhase
  from orion.testing.trial import compare_trials, create_trial
label_desc: Use image node_id 1 for calling the TestHyperband obj's underlying member method code with example usage: obj.test_register(hyperband, bracket, rung_0, rung_1) without return types