class_docstr: Dataset for Graph Isomorphism Network (GIN)
  Adapted from https://github.com/weihua916/powerful-gnns/blob/master/dataset.zip.
class_docstr_tok: ["Dataset","for","Graph","Isomorphism","Network","(","GIN",")","Adapted","from","https",":","\/\/github.com\/weihua916\/powerful-gnns\/blob\/master\/dataset.zip","."]
code: def __init__(
      self, data_path, dataset_name, self_loop, degree_as_nlabel=False
  ):
      self.data_path = data_path
      self.dataset_name = dataset_name
      self.self_loop = self_loop
      self.degree_as_nlabel = degree_as_nlabel
  
      self.graph_list = []
      self.glabel_list = []
  
      # relabel
      self.glabel_dict = {}
      self.nlabel_dict = {}
      self.elabel_dict = {}
      self.ndegree_dict = {}
  
      # global num
      self.num_graph = 0  # total graphs number
      self.n = 0  # total nodes number
      self.m = 0  # total edges number
  
      # global num of classes
      self.gclasses = 0
      self.nclasses = 0
      self.eclasses = 0
      self.dim_nfeats = 0
  
      # flags
      self.degree_as_nlabel = degree_as_nlabel
      self.nattrs_flag = False
      self.nlabels_flag = False
  
      self._load_data()
  
imports: import os
  import sys
  import numpy
  from sklearn.model_selection import StratifiedKFold
  import pgl
  from pgl.utils.logger import log
label_desc: Use image node_id 1 to create a new GINDataset object from inherited base classes: BaseDataset with example: obj = GINDataset(data_path, dataset_name, _loop, degree_as_nlabel)