class_docstr: Dataset base class for creating graph datasets which easily fit
  into CPU memory.
  See `here <https://pytorch-geometric.readthedocs.io/en/latest/tutorial/
  create_dataset.html#creating-in-memory-datasets>`__ for the accompanying
  tutorial.
  
  Args:
      root (str, optional): Root directory where the dataset should be saved.
          (optional: :obj:`None`)
      transform (callable, optional): A function/transform that takes in a
          :class:`~torch_geometric.data.Data` or
          :class:`~torch_geometric.data.HeteroData` object and returns a
          transformed version.
          The data object will be transformed before every access.
          (default: :obj:`None`)
      pre_transform (callable, optional): A function/transform that takes in
          a :class:`~torch_geometric.data.Data` or
          :class:`~torch_geometric.data.HeteroData` object and returns a
          transformed version.
          The data object will be transformed before being saved to disk.
          (default: :obj:`None`)
      pre_filter (callable, optional): A function that takes in a
          :class:`~torch_geometric.data.Data` or
          :class:`~torch_geometric.data.HeteroData` object and returns a
          boolean value, indicating whether the data object should be
          included in the final dataset. (default: :obj:`None`)
      log (bool, optional): Whether to print any console output while
          downloading and processing the dataset. (default: :obj:`True`)
      force_reload (bool, optional): Whether to re-process the dataset.
          (default: :obj:`False`)
class_docstr_tok: ["Dataset","base","class","for","creating","graph","datasets","which","easily","fit","into","CPU","memory",".","See","`","here","<","https",":","\/\/pytorch-geometric.readthedocs.io\/en\/latest\/tutorial\/","create_dataset.html","#","creating-in-memory-datasets",">","`","__","for","the","accompanying","tutorial",".","Args",":","root","(","str",",","optional",")",":","Root","directory","where","the","dataset","should","be","saved",".","(","optional",":",":","obj",":","`","None","`",")","transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","a",":","class",":","`","~torch_geometric.data.Data","`","or",":","class",":","`","~torch_geometric.data.HeteroData","`","object","and","returns","a","transformed","version",".","The","data","object","will","be","transformed","before","every","access",".","(","default",":",":","obj",":","`","None","`",")","pre_transform","(","callable",",","optional",")",":","A","function\/transform","that","takes","in","a",":","class",":","`","~torch_geometric.data.Data","`","or",":","class",":","`","~torch_geometric.data.HeteroData","`","object","and","returns","a","transformed","version",".","The","data","object","will","be","transformed","before","being","saved","to","disk",".","(","default",":",":","obj",":","`","None","`",")","pre_filter","(","callable",",","optional",")",":","A","function","that","takes","in","a",":","class",":","`","~torch_geometric.data.Data","`","or",":","class",":","`","~torch_geometric.data.HeteroData","`","object","and","returns","a","boolean","value",",","indicating","whether","the","data","object","should","be","included","in","the","final","dataset",".","(","default",":",":","obj",":","`","None","`",")","log","(","bool",",","optional",")",":","Whether","to","print","any","console","output","while","downloading","and","processing","the","dataset",".","(","default",":",":","obj",":","`","True","`",")","force_reload","(","bool",",","optional",")",":","Whether","to","re-process","the","dataset",".","(","default",":",":","obj",":","`","False","`",")"]
code: def len(self) -> int:
      if self.slices is None:
          return 1
      for _, value in nested_iter(self.slices):
          return len(value) - 1
      return 0
  
imports: import copy
  import os.path
  import warnings
  from abc import ABC
  from typing import Any, Callable, Dict, Iterable, List, Mapping, MutableSequence, Optional, Sequence, Tuple, Type, Union
  import torch
  from torch import Tensor
  from tqdm import tqdm
  import torch_geometric
  from torch_geometric.data import Batch, Data
  from torch_geometric.data.collate import collate
  from torch_geometric.data.data import BaseData
  from torch_geometric.data.dataset import Dataset, IndexType
  from torch_geometric.data.separate import separate
  from torch_geometric.io import fs
label_desc: Use image node_id 5 for calling the InMemoryDataset obj's underlying member method code with example usage: obj.len() and returns: int, int, unknown