code: def test_suggest_num_population_size_fork_completed(
      self, space: Space, mocker: MockerFixture
  ):
      population_size = 10
      pbt = _create_algo(
          space,
          population_size=population_size,
          exploit=ExploitStub(rval=None).configuration,
      ).unwrap(PBT)
  
      pbt_sample_mock = mocker.spy(pbt, "_sample")
      pbt_fork_mock = mocker.spy(pbt, "_fork_lineages")
  
      num = 4
      trials = pbt.suggest(num)
      assert len(trials) == num
  
      pbt_sample_mock.assert_called_with(num)
      pbt_fork_mock.assert_called_with(0)
  
      n_completed = 3
      for trial in trials[:n_completed]:
          trial.exp_working_dir = "/nothing"
          trial.status = "completed"
          trial._results.append(
              Trial.Result(name="objective", type="objective", value=1)
          )
  
      pbt.observe(trials)
      assert len(pbt._queue) == n_completed
  
      # There are 4 trials sampled, out of which 3 are completed. Still missing 6 trials
      # for base population.
      assert len(pbt.suggest(num)) == num
      pbt_sample_mock.assert_called_with(num)
      pbt_fork_mock.assert_called_with(0)
  
      # There are 8 trials sampled, out of which 3 are completed. Still missing 2 trials
      # for base population.
      assert len(pbt.suggest(num)) == num
      pbt_sample_mock.assert_called_with(2)
      pbt_fork_mock.assert_called_with(2)
  
imports: from __future__ import annotations
  import functools
  import logging
  from typing import ClassVar
  import numpy
  import pytest
  from base import ExploitStub, ExploreStub, sample_trials
  from pytest_mock import MockerFixture
  from orion.algo.pbt.pbt import PBT, compute_fidelities
  from orion.algo.space import Space
  from orion.core.worker.primary_algo import SpaceTransform, create_algo
  from orion.core.worker.transformer import ReshapedSpace, TransformedSpace
  from orion.core.worker.trial import Trial
  from orion.testing.algo import BaseAlgoTests, TestPhase
label_desc: Use image node_id 16 for calling the TestPBTSuggest obj's underlying member method code with example usage: obj.test_suggest_num_population_size_fork_completed(space, mocker) without return types