def get_strongly_connected_node(graph, nodeset):
    """
    Returns the node connected to the given node set the strongest.

    Returns None if there are no more nodes left.
    """
    max_weight = 0
    res = None
    for node in graph.nodes():
        if node not in nodeset:
            cur_weight = 0
            for other in nodeset:
                if other.has_edge_to(node):
                    cur_weight += other.edge_to(node).weight
            if cur_weight > max_weight:
                max_weight = cur_weight
                res = node

    return res