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