class_docstr: The GOOD-PCBA dataset. Adapted from `MoleculeNet
  <https://pubs.rsc.org/en/content/articlehtml/2018/sc/c7sc02664a>`_.
  
  Args:
      root (str): The dataset saving root.
      domain (str): The domain selection. Allowed: 'scaffold' and 'size'.
      shift (str): The distributional shift we pick. Allowed: 'no_shift', 'covariate', and 'concept'.
      subset (str): The split set. Allowed: 'train', 'id_val', 'id_test', 'val', and 'test'. When shift='no_shift',
          'id_val' and 'id_test' are not applicable.
      generate (bool): The flag for regenerating dataset. True: regenerate. False: download.
class_docstr_tok: ["The","GOOD-PCBA","dataset",".","Adapted","from","`","MoleculeNet","<","https",":","\/\/pubs.rsc.org\/en\/content\/articlehtml\/2018\/sc\/c7sc02664a",">","`","_",".","Args",":","root","(","str",")",":","The","dataset","saving","root",".","domain","(","str",")",":","The","domain","selection",".","Allowed",":","'scaffold","'","and","'size","'",".","shift","(","str",")",":","The","distributional","shift","we","pick",".","Allowed",":","'no_shift","'",",","'covariate","'",",","and","'concept","'",".","subset","(","str",")",":","The","split","set",".","Allowed",":","'train","'",",","'id_val","'",",","'id_test","'",",","'val","'",",","and","'test","'",".","When","shift='no_shift","'",",","'id_val","'","and","'id_test","'","are","not","applicable",".","generate","(","bool",")",":","The","flag","for","regenerating","dataset",".","True",":","regenerate",".","False",":","download","."]
docstr: A staticmethod for dataset loading. This method instantiates dataset class, constructing train, id_val, id_test,
  ood_val (val), and ood_test (test) splits. Besides, it collects several dataset meta information for further
  utilization.
  
  Args:
      dataset_root (str): The dataset saving root.
      domain (str): The domain selection. Allowed: 'degree' and 'time'.
      shift (str): The distributional shift we pick. Allowed: 'no_shift', 'covariate', and 'concept'.
      generate (bool): The flag for regenerating dataset. True: regenerate. False: download.
  
  Returns:
      dataset or dataset splits.
      dataset meta info.
docstr_tok: ["A","staticmethod","for","dataset","loading",".","This","method","instantiates","dataset","class",",","constructing","train",",","id_val",",","id_test",",","ood_val","(","val",")",",","and","ood_test","(","test",")","splits",".","Besides",",","it","collects","several","dataset","meta","information","for","further","utilization",".","Args",":","dataset_root","(","str",")",":","The","dataset","saving","root",".","domain","(","str",")",":","The","domain","selection",".","Allowed",":","'degree","'","and","'time","'",".","shift","(","str",")",":","The","distributional","shift","we","pick",".","Allowed",":","'no_shift","'",",","'covariate","'",",","and","'concept","'",".","generate","(","bool",")",":","The","flag","for","regenerating","dataset",".","True",":","regenerate",".","False",":","download",".","Returns",":","dataset","or","dataset","splits",".","dataset","meta","info","."]
code: def load(
      dataset_root: str,
      domain: str,
      shift: str = "no_shift",
      generate: bool = False,
  ):
      r"""
      A staticmethod for dataset loading. This method instantiates dataset class, constructing train, id_val, id_test,
      ood_val (val), and ood_test (test) splits. Besides, it collects several dataset meta information for further
      utilization.
  
      Args:
          dataset_root (str): The dataset saving root.
          domain (str): The domain selection. Allowed: 'degree' and 'time'.
          shift (str): The distributional shift we pick. Allowed: 'no_shift', 'covariate', and 'concept'.
          generate (bool): The flag for regenerating dataset. True: regenerate. False: download.
  
      Returns:
          dataset or dataset splits.
          dataset meta info.
      """
      meta_info = Munch()
      meta_info.dataset_type = "mol"
      meta_info.model_level = "graph"
  
      train_dataset = GOODPCBA(
          root=dataset_root,
          domain=domain,
          shift=shift,
          subset="train",
          generate=generate,
      )
      id_val_dataset = (
          GOODPCBA(
              root=dataset_root,
              domain=domain,
              shift=shift,
              subset="id_val",
              generate=generate,
          )
          if shift != "no_shift"
          else None
      )
      id_test_dataset = (
          GOODPCBA(
              root=dataset_root,
              domain=domain,
              shift=shift,
              subset="id_test",
              generate=generate,
          )
          if shift != "no_shift"
          else None
      )
      val_dataset = GOODPCBA(
          root=dataset_root,
          domain=domain,
          shift=shift,
          subset="val",
          generate=generate,
      )
      test_dataset = GOODPCBA(
          root=dataset_root,
          domain=domain,
          shift=shift,
          subset="test",
          generate=generate,
      )
  
      meta_info.dim_node = train_dataset.num_node_features
      meta_info.dim_edge = train_dataset.num_edge_features
  
      meta_info.num_envs = torch.unique(
          train_dataset.data.env_id
      ).shape[0]
  
      # Define networks' output shape.
      if train_dataset.task == "Binary classification":
          meta_info.num_classes = train_dataset.data.y.shape[1]
      elif train_dataset.task == "Regression":
          meta_info.num_classes = 1
      elif train_dataset.task == "Multi-label classification":
          meta_info.num_classes = torch.unique(
              train_dataset.data.y
          ).shape[0]
  
      # --- clear buffer dataset._data_list ---
      train_dataset._data_list = None
      if id_val_dataset:
          id_val_dataset._data_list = None
          id_test_dataset._data_list = None
      val_dataset._data_list = None
      test_dataset._data_list = None
  
      return {
          "train": train_dataset,
          "id_val": id_val_dataset,
          "id_test": id_test_dataset,
          "val": val_dataset,
          "test": test_dataset,
          "task": train_dataset.task,
          "metric": train_dataset.metric,
      }, meta_info
  
file_path: DIG/dig/oodgraph/good_pcba.py
imports: import os
  import os.path
  import gdown
  import torch
  from munch import Munch
  from torch_geometric.data import InMemoryDataset, extract_zip
label_desc: Use image node_id 7 for calling the GOODPCBA obj's underlying member method code with example usage: obj.load(dataset_root, domain, shift, generate) and returns: dict,  meta_info