code: def test_registry() -> None:
      class TestNamed(Named):
          def __init__(self, name: str) -> None:
              self.name = name
  
      o1 = TestNamed("o1")
      o2 = TestNamed("o2")
  
      reg: Registry[TestNamed] = Registry()
  
      assert () == reg.names()
      assert () == reg.all()
  
      assert o1 == reg.add(o1)
      assert o2 == reg.add(o2)
  
      assert ("o1", "o2") == reg.names()
      assert (o1, o2) == reg.all()
      assert o1 == reg.get("o1")
      assert o2 == reg.get("o2")
  
      o1_2 = TestNamed("o1")
      with pytest.raises(AssertionError):
          reg.add(o1_2)
  
imports: from typing import AbstractSet
  import pytest
  from benchmark.registry import Named, Registry, Tagged, TaggedRegistry
  from benchmark.tag import Tag
label_desc: Use image node_id 1 for calling a global function with example usage: test_registry() without return types