class_docstr: MNIST superpixel dataset for the graph classification task.
  
  DGL dataset of MNIST and CIFAR10 in the benchmark-gnn which contains graphs
  converted fromt the original MINST and CIFAR10 images.
  
  Reference `<http://arxiv.org/abs/2003.00982>`_
  
  Statistics:
  
      - Train examples: 60,000
      - Test examples: 10,000
      - Size of dataset images: 28
  
  Parameters
  ----------
  raw_dir : str
      Directory to store all the downloaded raw datasets.
      Default: "~/.dgl/".
  split : str
      Should be chosen from ["train", "test"]
      Default: "train".
  use_feature: bool
  
      - True: Adj matrix defined from super-pixel locations + features
      - False: Adj matrix defined from super-pixel locations (only)
  
      Default: False.
  force_reload : bool
      Whether to reload the dataset.
      Default: False.
  verbose : bool
      Whether to print out progress information.
      Default: False.
  transform : callable, optional
      A transform that takes in a :class:`~dgl.DGLGraph` object and returns
      a transformed version. The :class:`~dgl.DGLGraph` object will be
      transformed before every access.
  
  Examples
  ---------
  >>> from dgl.data import MNISTSuperPixelDataset
  
  >>> # MNIST dataset
  >>> train_dataset = MNISTSuperPixelDataset(split="train")
  >>> len(train_dataset)
  60000
  >>> graph, label = train_dataset[0]
  >>> graph
  Graph(num_nodes=71, num_edges=568,
      ndata_schemes={'feat': Scheme(shape=(3,), dtype=torch.float32)}
      edata_schemes={'feat': Scheme(shape=(1,), dtype=torch.float32)})
  
  >>> # support tensor to be index when transform is None
  >>> # see details in __getitem__ function
  >>> import torch
  >>> idx = torch.tensor([0, 1, 2])
  >>> train_dataset_subset = train_dataset[idx]
  >>> train_dataset_subset[0]
  Graph(num_nodes=71, num_edges=568,
      ndata_schemes={'feat': Scheme(shape=(3,), dtype=torch.float32)}
      edata_schemes={'feat': Scheme(shape=(1,), dtype=torch.float32)})
code: def __init__(
      self,
      raw_dir=None,
      split="train",
      use_feature=False,
      force_reload=False,
      verbose=False,
      transform=None,
  ):
      super().__init__(
          raw_dir=raw_dir,
          name="MNIST",
          split=split,
          use_feature=use_feature,
          force_reload=force_reload,
          verbose=verbose,
          transform=transform,
      )
  
imports: import os
  import pickle
  import numpy
  from scipy.spatial.distance import cdist
  from tqdm import tqdm
  from ..None import backend
  from ..convert import graph
  from .dgl_dataset import DGLDataset
  from .utils import download, extract_archive, load_graphs, save_graphs, Subset
label_desc: Use image node_id 1 to create a new MNISTSuperPixelDataset object from inherited base classes: SuperPixelDataset with example: obj = MNISTSuperPixelDataset(raw_dir, split, use_feature, force_reload, verbose, transform)