class_docstr: Encapsulating the basic subgraph data structure.
  
  Args:
  
      subgraph (pgl.Graph): Subgraph of the original graph object.
  
      batch_size (int): Original number of nodes of batch partition graphs.
  
      n_id (numpy.ndarray): An 1-D numpy array, contains original node ids of batch partition graphs, and 
                          the corresponding one-hop neighbor node ids of the original nodes.
  
      offset (numpy.ndarray): An 1-D numpy array, means the begin points of parition graphs' nodes in history embeddings.
  
      count (numpy.ndarray): An 1-D numpy array, contains the number of nodes of parition graphs in history embeddings.
  
  Examples:
  
      - Suppose after graph partition and permutation, new node order is [4, 6, 1, 5, 7, 0, 3, 2, 8, 9].
        And the partition graphs are [4, 6], [1, 5, 7], [0, 3], [2, 8, 9].
  
      - Suppose we have a batch subgraph, and its nodes is [0, 3, 4, 6](two of the above partition graphs), then the batch_size = 4.
  
      - We find the one hop neighbor nodes of the subgraph's nodes, which are [1, 2, 4, 7, 9], 
        then the n_id is [0, 3, 4, 6, 1, 2, 7, 9]. Also `4` is also the neighbor nodes, it is included in batch_size. 
  
      - The offset of the batch subgraph is [5, 1], we can see they are position indexes of 0 and 4 in node order.
  
      - The count of the batch subgraph is [2, 2], which is the length of corresponding partition graphs.
class_docstr_tok: ["Encapsulating","the","basic","subgraph","data","structure",".","Args",":","subgraph","(","pgl.Graph",")",":","Subgraph","of","the","original","graph","object",".","batch_size","(","int",")",":","Original","number","of","nodes","of","batch","partition","graphs",".","n_id","(","numpy.ndarray",")",":","An","1-D","numpy","array",",","contains","original","node","ids","of","batch","partition","graphs",",","and","the","corresponding","one-hop","neighbor","node","ids","of","the","original","nodes",".","offset","(","numpy.ndarray",")",":","An","1-D","numpy","array",",","means","the","begin","points","of","parition","graphs","'","nodes","in","history","embeddings",".","count","(","numpy.ndarray",")",":","An","1-D","numpy","array",",","contains","the","number","of","nodes","of","parition","graphs","in","history","embeddings",".","Examples",":","-","Suppose","after","graph","partition","and","permutation",",","new","node","order","is","[","4",",","6",",","1",",","5",",","7",",","0",",","3",",","2",",","8",",","9","]",".","And","the","partition","graphs","are","[","4",",","6","]",",","[","1",",","5",",","7","]",",","[","0",",","3","]",",","[","2",",","8",",","9","]",".","-","Suppose","we","have","a","batch","subgraph",",","and","its","nodes","is","[","0",",","3",",","4",",","6","]","(","two","of","the","above","partition","graphs",")",",","then","the","batch_size","=","4",".","-","We","find","the","one","hop","neighbor","nodes","of","the","subgraph","'s","nodes",",","which","are","[","1",",","2",",","4",",","7",",","9","]",",","then","the","n_id","is","[","0",",","3",",","4",",","6",",","1",",","2",",","7",",","9","]",".","Also","`","4","`","is","also","the","neighbor","nodes",",","it","is","included","in","batch_size",".","-","The","offset","of","the","batch","subgraph","is","[","5",",","1","]",",","we","can","see","they","are","position","indexes","of","0","and","4","in","node","order",".","-","The","count","of","the","batch","subgraph","is","[","2",",","2","]",",","which","is","the","length","of","corresponding","partition","graphs","."]
code: def __init__(self, subgraph, batch_size, n_id, offset, count):
      self.subgraph = subgraph
      self.batch_size = batch_size
      self.n_id = n_id
      self.offset = offset
      self.count = count
  
imports: import os
  import math
  from functools import partial
  import numpy
  import paddle
  import pgl
  from pgl.utils.logger import log
  from pgl.utils.data import Dataset
  from pgl.sampling.custom import subgraph
  from pgl.utils.data.dataloader import Dataloader
  from pgl.utils.transform import to_undirected, add_self_loops
  from utils import generate_mask
label_desc: Use image node_id 1 to create a new SubgraphData object from inherited base classes: object with example: obj = SubgraphData(subgraph, batch_size, n_id, offset, count)