code: def test_is_done_max_trials(self, num: int):
      space = self.create_space()
  
      MAX_TRIALS = 10
      algo = self.create_algo(space=space)
      algo.algorithm.max_trials = MAX_TRIALS
  
      rng = np.random.RandomState(123456)
  
      while not algo.is_done:
          trials = algo.suggest(num)
          assert trials is not None
          if trials:
              self.observe_trials(trials, algo, rng)
  
      # Hyperband should ignore max trials.
      assert algo.n_observed > MAX_TRIALS
      assert algo.is_done
  
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 4 for calling the TestGenericHyperband obj's underlying member method code with example usage: obj.test_is_done_max_trials(num) without return types