code: def assert_callbacks(
      self, spy, num: int, algo: SpaceTransform[Hyperband]
  ):
      if num == 0:
          return
  
      repetition_id, rung_id = self.infer_repetition_and_rung(num - 1)
  
      brackets = algo.algorithm.brackets
      assert brackets is not None
      assert len(brackets) == repetition_id * len(brackets[0].rungs)
  
      for j in range(0, rung_id + 1):
          for bracket in brackets:
              if len(bracket.rungs) > j:
                  assert len(bracket.rungs[j]["results"]) > 0, (
                      bracket,
                      j,
                  )
  
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 7 for calling the TestGenericHyperband obj's underlying member method code with example usage: obj.assert_callbacks(spy, num, algo) without return types