code: def test_fork_lineages_branch_trials(self, space: Space):
      num = 10
  
      pbt = _create_algo(
          space,
          exploit=ExploitStub(rval="toset").configuration,
          fork_timeout=0.05,
      ).unwrap(PBT)
  
      trials = sample_trials(
          pbt.space, num + 1, status="completed", objective=1
      )
      trial_to_branch = trials[-1]
      pbt.exploit_func.rval = trial_to_branch
      for trial in trials:
          pbt.register(trial)
  
      pbt._queue = trials[:-1]
  
      branched_trials = pbt._fork_lineages(num)
  
      assert len(trials) == num + 1
      assert len(branched_trials) == num
      assert pbt._queue == []
  
      for trial, branched_trial in zip(trials, branched_trials):
          # Check if parent is correct
          assert branched_trial.parent == trial_to_branch.id
          # Check in lineage if jump is set from correct base trial
          assert (
              pbt.lineages.get_lineage(branched_trial).base.item.id
              == trial.id
          )
          # Check if params are not duplicated
          should_not_be_params = trial_to_branch.params
          should_not_be_params["f"] = 10.9
          assert branched_trial.params["f"] == should_not_be_params["f"]
          assert branched_trial.params != should_not_be_params
  
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 10 for calling the TestPBTSuggest obj's underlying member method code with example usage: obj.test_fork_lineages_branch_trials(space) without return types