def find_connected_nodes(G):
    nodes = torch.nonzero(G.out_degrees()).squeeze((- 1))
    return nodes
def find_connected_nodes(G):
    nodes = torch.nonzero(G.out_degrees()).squeeze((- 1))
    return nodes