| """ | |
| Lightweight shim for `graph` used by trace_back tests. This provides minimal | |
| APIs used by tests so imports succeed during test collection. | |
| """ | |
| from typing import Any, List, Tuple | |
| class Graph: | |
| def __init__(self): | |
| self.nodes = [] | |
| self.edges = [] | |
| def build_problem(problem: Any, defs: Any) -> Tuple[Any, Any]: | |
| # Return a trivial graph and mapping for tests | |
| return Graph(), {} | |
| def names2nodes(args: List[Any]) -> List[int]: | |
| return list(range(len(args))) | |
| __all__ = ["Graph", "names2nodes"] | |