code: def test_fork_lineages_branch_duplicates(
      self, space: Space, caplog: pytest.LogCaptureFixture
  ):
      num = 10
      pbt = _create_algo(
          space,
          exploit=ExploitStub(rval="toset").configuration,
          explore=ExploreStub(rval="toset").configuration,
          fork_timeout=0.05,
      ).unwrap(PBT)
  
      trials = sample_trials(
          pbt.space, num + 1, status="completed", objective=1
      )
      new_params_expected = trials[-1].params
      pbt.exploit_func.rval = trials[-1]
      pbt.explore_func.rval = new_params_expected
      for trial in trials:
          pbt.register(trial)
  
      pbt._queue = trials[:-1]
  
      with caplog.at_level(logging.INFO):
          branched_trials = pbt._fork_lineages(num)
  
      assert (
          "Could not generate unique new parameters"
          in caplog.records[-1].message
      )
      assert len(branched_trials) == 1
      assert branched_trials[0].params == {
          **trials[-1].params,
          **{"f": 10.9},
      }
  
      # First queue.pop is fine, fails on second queue.pop, trial is reinserted at beginning
      assert len(pbt._queue) == num - 1
      assert (
          len(trials) == num + 1
      )  # make sure trials list was not modified during execution.
      assert pbt._queue[0].params == trials[1].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 11 for calling the TestPBTSuggest obj's underlying member method code with example usage: obj.test_fork_lineages_branch_duplicates(space, caplog) without return types