class_docstr: PrePartitionDataset helps build train dataset. The difference between PartitionDataset is that 
     we generate each partition subgraph' data in advance, like one-hop neighbors, etc.
  
  Args:
  
     graph (pgl.Graph): The input graph.
  
     part (numpy.ndarray): An 1-D numpy array, which helps distinguish different parts of partition graphs.
  
     load_epoch (int): We use to `load_epoch` to load much more epochs of data in advance, so as to speed up
                       the data loading process and reduce the numbers of process switching. It is useful
                       for dataset with small number of batches.
class_docstr_tok: ["PrePartitionDataset","helps","build","train","dataset",".","The","difference","between","PartitionDataset","is","that","we","generate","each","partition","subgraph","'","data","in","advance",",","like","one-hop","neighbors",",","etc",".","Args",":","graph","(","pgl.Graph",")",":","The","input","graph",".","part","(","numpy.ndarray",")",":","An","1-D","numpy","array",",","which","helps","distinguish","different","parts","of","partition","graphs",".","load_epoch","(","int",")",":","We","use","to","`","load_epoch","`","to","load","much","more","epochs","of","data","in","advance",",","so","as","to","speed","up","the","data","loading","process","and","reduce","the","numbers","of","process","switching",".","It","is","useful","for","dataset","with","small","number","of","batches","."]
code: def __init__(self, graph, part, load_epoch=1):
      self.part = part
      self.load_epoch = load_epoch
      batches_nid = np.split(
          np.arange(graph.num_nodes), self.part[1:-1]
      )
      self.center_nodes = [nid for nid in batches_nid]
      self.one_hops = [
          graph.predecessor(nid, return_eids=True)
          for nid in batches_nid
      ]
      self.one_hop_nodes = [
          np.concatenate(item[0], -1) for item in self.one_hops
      ]
      self.one_hop_eids = [
          np.concatenate(item[1], -1) for item in self.one_hops
      ]
      self.orig_len = len(self.part) - 1
  
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 PrePartitionDataset object from inherited base classes: Dataset with example: obj = PrePartitionDataset(graph, part, load_epoch)