code: def __init__(self, config, raw_dataset, mode="train", transform=None):
      self.config = config
      self.raw_dataset = raw_dataset
      self.mode = mode
      self.transform = transform
  
      log.info("preprocess graph data in %s" % self.__class__.__name__)
      self.graph_list = []
      for i in range(len(self.raw_dataset)):
          # num_nodes, edge_index, node_feat, edge_feat, label
          graph, label = self.raw_dataset[i]
          num_nodes = graph["num_nodes"]
          node_feat = graph["node_feat"].copy()
          edges = list(
              zip(graph["edge_index"][0], graph["edge_index"][1])
          )
          edge_feat = graph["edge_feat"].copy()
  
          new_graph = {}
          new_graph["num_nodes"] = num_nodes
          new_graph["nfeat"] = node_feat
          new_graph["edges"] = edges
          new_graph["efeat"] = edge_feat
          new_graph["label"] = label
  
          self.graph_list.append(new_graph)
  
imports: import os
  import sys
  import json
  import numpy
  import glob
  import copy
  import time
  import argparse
  from collections import OrderedDict, namedtuple
  from scipy.sparse import csr_matrix
  from ogb.graphproppred import GraphPropPredDataset
  from ogb.utils.features import get_atom_feature_dims, get_bond_feature_dims
  import pgl
  import paddle
  from pgl.utils.data.dataset import Dataset, StreamDataset, HadoopDataset
  from pgl.utils.data import Dataloader
  from pgl.utils.logger import log
  from utils.config import prepare_config, make_dir
label_desc: Use image node_id 1 to create a new MolDataset object from inherited base classes: Dataset with example: obj = MolDataset(config, raw_dataset, mode, transform)