code: 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
docs: Returns all nodes that has an out degree >= 2