def _extract_edges(cfg: ControlFlowGraph) -> List[List[List[str]]]: edges = [[edge.source.statements, edge.target.statements] for edge in cfg.get_edges()] expanded_edges = [[[source.as_string() for source in edge[0]], [target.as_string() for target in edge[1]]] for edge in edges] return expanded_edges
def _extract_blocks(cfg: ControlFlowGraph) -> List[List[str]]: return [[s.as_string() for s in block.statements] for block in cfg.get_blocks()]