def _parse_edge(graph, node, text, yes_color='#0000FF', no_color='#FF0000'):
    """parse dumped edge"""
    try:
        match = _EDGEPAT.match(text)
        if match is not None:
            yes, no, missing = match.groups()
            if yes == missing:
                graph.edge(node, yes, label='yes, missing', color=yes_color)
                graph.edge(node, no, label='no', color=no_color)
            else:
                graph.edge(node, yes, label='yes', color=yes_color)
                graph.edge(node, no, label='no, missing', color=no_color)
            return
    except ValueError:
        pass
    match = _EDGEPAT2.match(text)
    if match is not None:
        yes, no = match.groups()
        graph.edge(node, yes, label='yes', color=yes_color)
        graph.edge(node, no, label='no', color=no_color)
        return
    raise ValueError('Unable to parse edge: {0}'.format(text))
def _parse_edge ( graph , node , text , yes_color = '#0000FF' , no_color = '#FF0000' ) : try : match = _EDGEPAT . match ( text ) if match is not None : yes , no , missing = match . groups ( ) if yes == missing : graph . edge ( node , yes , label = 'yes, missing' , color = yes_color ) graph . edge ( node , no , label = 'no' , color = no_color ) else : graph . edge ( node , yes , label = 'yes' , color = yes_color ) graph . edge ( node , no , label = 'no, missing' , color = no_color ) return except ValueError : pass match = _EDGEPAT2 . match ( text ) if match is not None : yes , no = match . groups ( ) graph . edge ( node , yes , label = 'yes' , color = yes_color ) graph . edge ( node , no , label = 'no' , color = no_color ) return raise ValueError ( 'Unable to parse edge: {0}' . format ( text ) )
parse dumped edge