def _search_space_graph(search_space: dict[str, SearchParameter]) -> DirectedGraph:
    """Create a directed graph from the search space."""
    graph = DirectedGraph(list(search_space.keys()))
    for name, param in search_space.items():
        if isinstance(param, Conditional):
            for parent in param.parents:
                graph.add_edge(parent, name)
    return graph
Create a directed graph from the search space.
olive/search/utils.py