from __future__ import annotations from typing import Any, Dict class GraphRegistry: def __init__(self) -> None: self._contracts: Dict[str, Any] = {} def register_contract(self, name: str, contract: Any) -> None: self._contracts[name] = contract def get_contract(self, name: str) -> Any | None: return self._contracts.get(name) def list_contracts(self) -> Dict[str, Any]: return dict(self._contracts)