code: def _aug_data(self, data):
      node_num, _ = data.x.size()
      _, edge_num = data.edge_index.size()
      sub_num = int(node_num * self.aug_ratio)
  
      edge_index = data.edge_index.numpy()
  
      idx_sub = [np.random.randint(node_num, size=1)[0]]
      idx_neigh = set(
          [n for n in edge_index[1][edge_index[0] == idx_sub[0]]]
      )
  
      count = 0
      while len(idx_sub) <= sub_num:
          count = count + 1
          if count > node_num:
              break
          if len(idx_neigh) == 0:
              break
          sample_node = np.random.choice(list(idx_neigh))
          if sample_node in idx_sub:
              continue
          idx_sub.append(sample_node)
          idx_neigh.union(
              set(
                  [
                      n
                      for n in edge_index[1][
                          edge_index[0] == idx_sub[-1]
                      ]
                  ]
              )
          )
  
      idx_drop = [n for n in range(node_num) if not n in idx_sub]
      idx_nondrop = idx_sub
      data.x = data.x[idx_nondrop]
      idx_dict = {
          idx_nondrop[n]: n for n in list(range(len(idx_nondrop)))
      }
  
      edge_index = data.edge_index.numpy()
      adj = torch.zeros((node_num, node_num))
      adj[edge_index[0], edge_index[1]] = 1
      adj[list(range(node_num)), list(range(node_num))] = 1
      adj = adj[idx_nondrop, :][:, idx_nondrop]
      edge_index = adj.nonzero().t()
  
      # edge_index = [[idx_dict[edge_index[0, n]], idx_dict[edge_index[1, n]]] for n in range(edge_num) if (not edge_index[0, n] in idx_drop) and (not edge_index[1, n] in idx_drop)] + [[n, n] for n in idx_nondrop]
      data.edge_index = edge_index
  
      return data
  
imports: import random
  import torch
  import numpy
  from itertools import repeat, product
  from torch_geometric.data import Batch
label_desc: Use image node_id 2 for calling the SubGraph obj's underlying member method code with example usage: obj._aug_data(data) and returns: data