class_docstr: A utility class to download built-in dataset from AWS S3 and load it as
  :class:`OnDiskDataset`.
  
  Available built-in datasets include:
  
  **cora**
      The cora dataset is a homogeneous citation network dataset, which is
      designed for the node classification task.
  
  **ogbn-mag**
      The ogbn-mag dataset is a heterogeneous network composed of a subset of
      the Microsoft Academic Graph (MAG). See more details in
      `ogbn-mag <https://ogb.stanford.edu/docs/nodeprop/#ogbn-mag>`_.
  
      .. note::
          Reverse edges are added to the original graph and duplicated
          edges are removed.
  
  **ogbl-citation2**
      The ogbl-citation2 dataset is a directed graph, representing the
      citation network between a subset of papers extracted from MAG. See
      more details in `ogbl-citation2
      <https://ogb.stanford.edu/docs/linkprop/#ogbl-citation2>`_.
  
      .. note::
          Reverse edges are added to the original graph and duplicated
          edges are removed.
  
  **ogbn-arxiv**
      The ogbn-arxiv dataset is a directed graph, representing the citation
      network between all Computer Science (CS) arXiv papers indexed by MAG.
      See more details in `ogbn-arxiv
      <https://ogb.stanford.edu/docs/nodeprop/#ogbn-arxiv>`_.
  
      .. note::
          Reverse edges are added to the original graph and duplicated
          edges are removed.
  
  **ogbn-products**
      The ogbn-products dataset is an undirected and unweighted graph,
      representing an Amazon product co-purchasing network. See more details
      in `ogbn-products
      <https://ogb.stanford.edu/docs/nodeprop/#ogbn-products>`_.
  
      .. note::
          Reverse edges are added to the original graph.
          Node features are stored as float32.
  
  **ogb-lsc-mag240m**
      The ogb-lsc-mag240m dataset is a heterogeneous academic graph extracted
      from the Microsoft Academic Graph (MAG). See more details in
      `ogb-lsc-mag240m <https://ogb.stanford.edu/docs/lsc/mag240m/>`_.
  
      .. note::
          Reverse edges are added to the original graph.
  
  Parameters
  ----------
  name : str
      The name of the builtin dataset.
  root : str, optional
      The root directory of the dataset. Default ot ``datasets``.
class_docstr_tok: ["A","utility","class","to","download","built-in","dataset","from","AWS","S3","and","load","it","as",":","class",":","`","OnDiskDataset","`",".","Available","built-in","datasets","include",":","*","*","cora","*","*","The","cora","dataset","is","a","homogeneous","citation","network","dataset",",","which","is","designed","for","the","node","classification","task",".","*","*","ogbn-mag","*","*","The","ogbn-mag","dataset","is","a","heterogeneous","network","composed","of","a","subset","of","the","Microsoft","Academic","Graph","(","MAG",")",".","See","more","details","in","`","ogbn-mag","<","https",":","\/\/ogb.stanford.edu\/docs\/nodeprop\/","#","ogbn-mag",">","`","_",".","..","note",":",":","Reverse","edges","are","added","to","the","original","graph","and","duplicated","edges","are","removed",".","*","*","ogbl-citation2","*","*","The","ogbl-citation2","dataset","is","a","directed","graph",",","representing","the","citation","network","between","a","subset","of","papers","extracted","from","MAG",".","See","more","details","in","`","ogbl-citation2","<","https",":","\/\/ogb.stanford.edu\/docs\/linkprop\/","#","ogbl-citation2",">","`","_",".","..","note",":",":","Reverse","edges","are","added","to","the","original","graph","and","duplicated","edges","are","removed",".","*","*","ogbn-arxiv","*","*","The","ogbn-arxiv","dataset","is","a","directed","graph",",","representing","the","citation","network","between","all","Computer","Science","(","CS",")","arXiv","papers","indexed","by","MAG",".","See","more","details","in","`","ogbn-arxiv","<","https",":","\/\/ogb.stanford.edu\/docs\/nodeprop\/","#","ogbn-arxiv",">","`","_",".","..","note",":",":","Reverse","edges","are","added","to","the","original","graph","and","duplicated","edges","are","removed",".","*","*","ogbn-products","*","*","The","ogbn-products","dataset","is","an","undirected","and","unweighted","graph",",","representing","an","Amazon","product","co-purchasing","network",".","See","more","details","in","`","ogbn-products","<","https",":","\/\/ogb.stanford.edu\/docs\/nodeprop\/","#","ogbn-products",">","`","_",".","..","note",":",":","Reverse","edges","are","added","to","the","original","graph",".","Node","features","are","stored","as","float32",".","*","*","ogb-lsc-mag240m","*","*","The","ogb-lsc-mag240m","dataset","is","a","heterogeneous","academic","graph","extracted","from","the","Microsoft","Academic","Graph","(","MAG",")",".","See","more","details","in","`","ogb-lsc-mag240m","<","https",":","\/\/ogb.stanford.edu\/docs\/lsc\/mag240m\/",">","`","_",".","..","note",":",":","Reverse","edges","are","added","to","the","original","graph",".","Parameters","--","--","--","--","--","name",":","str","The","name","of","the","builtin","dataset",".","root",":","str",",","optional","The","root","directory","of","the","dataset",".","Default","ot","``","datasets","``","."]
code: def __init__(
      self, name: str, root: str = "datasets"
  ) -> OnDiskDataset:
      dataset_dir = os.path.join(root, name)
      if not os.path.exists(dataset_dir):
          if name not in self._all_datasets:
              raise RuntimeError(
                  f"Dataset {name} is not available. Available datasets are "
                  f"{self._all_datasets}."
              )
          url = (
              self._accelerated_url
              if name in self._large_datasets
              else self._base_url
          )
          url += name + ".zip"
          os.makedirs(root, exist_ok=True)
          zip_file_path = os.path.join(root, name + ".zip")
          download(url, path=zip_file_path)
          extract_archive(zip_file_path, root, overwrite=True)
          os.remove(zip_file_path)
      super().__init__(dataset_dir, force_preprocess=False)
  
imports: import json
  import os
  import shutil
  import textwrap
  from copy import deepcopy
  from typing import Dict, List, Union
  import torch
  import yaml
  import dgl
  from ...base import dgl_warning
  from ...data.utils import download, extract_archive
  from ..base import etype_str_to_tuple
  from ..dataset import Dataset, Task
  from ..internal import calculate_dir_hash, check_dataset_change, copy_or_convert_data, get_attributes, read_data, read_edges
  from ..itemset import ItemSet, ItemSetDict
  from ..sampling_graph import SamplingGraph
  from .fused_csc_sampling_graph import from_dglgraph, FusedCSCSamplingGraph
  from .ondisk_metadata import OnDiskGraphTopology, OnDiskMetaData, OnDiskTaskData, OnDiskTVTSet
  from .torch_based_feature_store import TorchBasedFeatureStore
label_desc: Use image node_id 1 to create a new BuiltinDataset object from inherited base classes: OnDiskDataset with example: obj = BuiltinDataset(name, root)