docstr: Get the idx-th sample.
  
  Parameters
  ---------
  idx : int or tensor
      The sample index.
      1-D tensor as `idx` is allowed when transform is None.
  
  Returns
  -------
  (:class:`dgl.DGLGraph`, Tensor)
      Graph with node feature stored in ``feat`` field and its label.
  or
  :class:`dgl.data.utils.Subset`
      Subset of the dataset at specified indices
docstr_tok: ["Get","the","idx-th","sample",".","Parameters","--","--","--","--","-","idx",":","int","or","tensor","The","sample","index",".","1-D","tensor","as","`","idx","`","is","allowed","when","transform","is","None",".","Returns","--","--","--","-","(",":","class",":","`","dgl.DGLGraph","`",",","Tensor",")","Graph","with","node","feature","stored","in","``","feat","``","field","and","its","label",".","or",":","class",":","`","dgl.data.utils.Subset","`","Subset","of","the","dataset","at","specified","indices"]
code: def __getitem__(self, idx):
      """Get the idx-th sample.
  
      Parameters
      ---------
      idx : int or tensor
          The sample index.
          1-D tensor as `idx` is allowed when transform is None.
  
      Returns
      -------
      (:class:`dgl.DGLGraph`, Tensor)
          Graph with node feature stored in ``feat`` field and its label.
      or
      :class:`dgl.data.utils.Subset`
          Subset of the dataset at specified indices
      """
      if F.is_tensor(idx) and idx.dim() == 1:
          if self._transform is None:
              return Subset(self, idx.cpu())
  
          raise ValueError(
              "Tensor idx not supported when transform is not None."
          )
  
      if self._transform is None:
          return self.graphs[idx], self.labels[idx]
  
      return self._transform(self.graphs[idx]), self.labels[idx]
  
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 12 for calling the SuperPixelDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: self,  self, self,  self, Subset