code: def load_dataset(dataset, sparse_features, normalize_adj):
      """Loads dataset."""
      dir_path = os.path.join("data", dataset)
      content_path = os.path.join(
          dir_path, "{}.content".format(dataset)
      )
      citation_path = os.path.join(dir_path, "{}.cites".format(dataset))
  
      content = np.genfromtxt(content_path, dtype=np.dtype(str))
      idx = np.array(content[:, 0])
      features = sp.csr_matrix(content[:, 1:-1], dtype=np.float32)
      labels = encode_onehot(dataset, content[:, -1])
  
      # Dict which maps paper id to data id
      idx_map = {j: i for i, j in enumerate(idx)}
      edges_unordered = np.genfromtxt(
          citation_path, dtype=np.dtype(str)
      )
      edges = np.array(
          list(map(idx_map.get, edges_unordered.flatten())),
          dtype=np.dtype(str),
      ).reshape(edges_unordered.shape)
  
      # Delete relation which the nodes appear in cites but not in content
      del_rel = []
      for i, j in enumerate(edges):
          if j[0] == "None" or j[1] == "None":
              del_rel.append(i)
      edges = np.delete(edges, del_rel, 0)
  
      adj = sp.coo_matrix(
          (np.ones(edges.shape[0]), (edges[:, 0], edges[:, 1])),
          shape=(labels.shape[0], labels.shape[0]),
          dtype=np.float32,
      )
  
      # build symmetric adjacency matrix
      adj = (
          adj + adj.T.multiply(adj.T > adj) - adj.multiply(adj.T > adj)
      )
      # Add self-connection edge
      adj = adj + sp.eye(adj.shape[0])
  
      features = normalize_features(features)
      if normalize_adj:
          adj = normalize_adj_matrix(adj)
  
      idx_train = slice(140)
      idx_val = slice(200, 500)
      idx_test = slice(500, 1500)
  
      features = tf.convert_to_tensor(np.array(features.todense()))
      labels = tf.convert_to_tensor(np.where(labels)[1])
  
      if sparse_features:
          adj = sparse_matrix_to_tf_sparse_tensor(adj)
      else:
          adj = tf.convert_to_tensor(np.array(adj.todense()))
  
      return adj, features, labels, idx_train, idx_val, idx_test
  
file_path: neural-structured-learning/research/gnn-survey/utils.py
imports: import os
  from models import GAT
  from models import GCN
  from models import GIN
  import numpy
  import scipy.sparse
  import tensorflow
label_desc: Use image node_id 7 for calling a global function with example usage: load_dataset(dataset, sparse_features, normalize_adj) and returns: adj,  features,  labels,  idx_train,  idx_val,  idx_test