code: def test_add_duplicate(self):
      lineages = Lineages()
      assert len(lineages) == 0
      lineage = lineages.add(TrialStub(id="stub"))
      assert len(lineages) == 1
  
      new_lineage = lineages.add(TrialStub(id="stub"))
      assert new_lineage is lineage
      assert len(lineages) == 1
  
imports: import os
  import random
  import pytest
  from base import ObjectiveStub, TrialStub, build_full_tree, build_population, compare_generations
  from orion.algo.pbt.pbt import LineageNode, Lineages
label_desc: Use image node_id 2 for calling the TestLineages obj's underlying member method code with example usage: obj.test_add_duplicate() without return types