def get_entering_nodes(self, node):
    'Returns all nodes that have an edge that enter the specificed node'
    enter_edge_pattern = re.compile('edge_(?P<begin_node>\\w+)_{0}_(?P<iterator>\\w+)'.format(node))
    enter_nodes = []
    for (index, edge) in enumerate(self.edges):
        enter_match = re.match(enter_edge_pattern, edge)
        if enter_match:
            enter_node = enter_match.groupdict()['begin_node']
            enter_nodes.append(enter_node)
    return enter_nodes
Returns all nodes that have an edge that enter the specificed node
def get_entering_nodes(self, node):
    
    enter_edge_pattern = re.compile('edge_(?P<begin_node>\\w+)_{0}_(?P<iterator>\\w+)'.format(node))
    enter_nodes = []
    for (index, edge) in enumerate(self.edges):
        enter_match = re.match(enter_edge_pattern, edge)
        if enter_match:
            enter_node = enter_match.groupdict()['begin_node']
            enter_nodes.append(enter_node)
    return enter_nodes