code: def test_LocalGroupDB(self):
      lg_db = LocalGroupDB()
  
      lg_db.register("a", TestRewriter(), 1)
  
      assert "a" in lg_db.__position__
  
      with pytest.raises(TypeError, match=r"`position` must be.*"):
          lg_db.register("b", TestRewriter(), position=object())
  
file_path: pytensor/tests/graph/rewriting/test_db.py
imports: import pytest
  from pytensor.graph.rewriting.basic import GraphRewriter, SequentialGraphRewriter
  from pytensor.graph.rewriting.db import EquilibriumDB, LocalGroupDB, ProxyDB, RewriteDatabase, SequenceDB
label_desc: Use image node_id 4 for calling the TestDB obj's underlying member method code with example usage: obj.test_LocalGroupDB() without return types