code: def find_connected_nodes(G):
      nodes = torch.nonzero(G.out_degrees(), as_tuple=False).squeeze(-1)
      return nodes
  
imports: import os
  import pickle
  import random
  import time
  import dgl
  import numpy
  import scipy.sparse
  import torch
  from dgl.data.utils import _get_dgl_url, download, extract_archive, get_download_dir
  from torch.utils.data import DataLoader
label_desc: Use image node_id 4 for calling a global function with example usage: find_connected_nodes(G) and returns: nodes