def parse_flow_graph(flow_graph):
    """Parse flow graph generated with Cflow"""

    def _get_file_dep(x):
        y = x.split(' at ')[-1]
        return y.split(':')[0]

    edges = set([])

    current = _get_file_dep(flow_graph[0])
    v = None

    # Build edge set
    for line in flow_graph:
        if line.startswith('    '):
            v = _get_file_dep(line)
            e = (current, v)
            edges |= {e}
        else:
            current = _get_file_dep(line)

    return edges