'Returns all nodes that has an out degree >= 2'

def get_branching_nodes(self):

    nodes = set()
    for n in self._graph.nodes():
        if (self._graph.out_degree(n) >= 2):
            nodes.add(n)
    return nodes
