class_docstr: Test suite for algorithm BOHB
code: def test_is_done_max_trials(
      self, num
  ):  # pylint: disable=arguments-differ
      space = self.create_space()
  
      MAX_TRIALS = 5  # pylint: disable=invalid-name
      algo = self.create_algo(space=space)
      algo.algorithm.max_trials = MAX_TRIALS
  
      objective = 0
      while not algo.is_done:
          trials = algo.suggest(num)
          assert trials is not None
          if trials:
              self.observe_trials(trials, algo, objective)
              objective += len(trials)
  
      # Hyperband should ignore max trials.
      assert algo.n_observed > MAX_TRIALS
      assert algo.is_done
  
file_path: orion/tests/unittests/algo/test_bohb.py
imports: import pytest
  from orion.algo.bohb import import_optional
  from orion.testing.algo import BaseAlgoTests
label_desc: Use image node_id 5 for calling the TestBOHB obj's underlying member method code with example usage: obj.test_is_done_max_trials(num) without return types