class_docstr: LegacyTUDataset contains lots of graph kernel datasets for graph classification.
  
  Parameters
  ----------
  name : str
      Dataset Name, such as ``ENZYMES``, ``DD``, ``COLLAB``, ``MUTAG``, can be the
      datasets name on `<https://chrsmrrs.github.io/datasets/docs/datasets/>`_.
  use_pandas : bool
      Numpy's file read function has performance issue when file is large,
      using pandas can be faster.
      Default: False
  hidden_size : int
      Some dataset doesn't contain features.
      Use constant node features initialization instead, with hidden size as ``hidden_size``.
      Default : 10
  max_allow_node : int
      Remove graphs that contains more nodes than ``max_allow_node``.
      Default : None
  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.
  
  Attributes
  ----------
  max_num_node : int
      Maximum number of nodes
  num_classes : int
      Number of classes
  num_labels : numpy.int64
      (DEPRECATED, use num_classes instead) Number of classes
  
  Notes
  -----
  LegacyTUDataset uses provided node feature by default. If no feature provided, it uses one-hot node label instead.
  If neither labels provided, it uses constant for node feature.
  
  The dataset sorts graphs by their labels.
  Shuffle is preferred before manual train/val split.
  
  Examples
  --------
  >>> data = LegacyTUDataset('DD')
  
  The dataset instance is an iterable
  
  >>> len(data)
  1178
  >>> g, label = data[1024]
  >>> g
  Graph(num_nodes=88, num_edges=410,
        ndata_schemes={'feat': Scheme(shape=(89,), dtype=torch.float32), '_ID': Scheme(shape=(), dtype=torch.int64)}
        edata_schemes={'_ID': Scheme(shape=(), dtype=torch.int64)})
  >>> label
  tensor(1)
  
  Batch the graphs and labels for mini-batch training
  
  >>> graphs, labels = zip(*[data[i] for i in range(16)])
  >>> batched_graphs = dgl.batch(graphs)
  >>> batched_labels = torch.tensor(labels)
  >>> batched_graphs
  Graph(num_nodes=9539, num_edges=47382,
        ndata_schemes={'feat': Scheme(shape=(89,), dtype=torch.float32), '_ID': Scheme(shape=(), dtype=torch.int64)}
        edata_schemes={'_ID': Scheme(shape=(), dtype=torch.int64)})
docstr: Get the idx-th sample.
  
  Parameters
  ---------
  idx : int
      The sample index.
  
  Returns
  -------
  (:class:`dgl.DGLGraph`, Tensor)
      Graph with node feature stored in ``feat`` field and node label in ``node_label`` if available.
      And its label.
code: def __getitem__(self, idx):
      """Get the idx-th sample.
  
      Parameters
      ---------
      idx : int
          The sample index.
  
      Returns
      -------
      (:class:`dgl.DGLGraph`, Tensor)
          Graph with node feature stored in ``feat`` field and node label in ``node_label`` if available.
          And its label.
      """
      g = self.graph_lists[idx]
      if self._transform is not None:
          g = self._transform(g)
      return g, self.graph_labels[idx]
  
imports: from __future__ import absolute_import
  import os
  import numpy
  from ..None import backend
  from ..convert import graph
  from .dgl_dataset import DGLBuiltinDataset
  from .utils import load_graphs, load_info, loadtxt, save_graphs, save_info
label_desc: Use image node_id 8 for calling the LegacyTUDataset obj's underlying member method code with example usage: obj.__getitem__(idx) and returns: g,  self