class_docstr: An extended TUDataset from `Pytorch Geometric 
  <https://pytorch-geometric.readthedocs.io/en/latest/index.html>`_, including
  a variety of graph kernel benchmark datasets, *e.g.* "IMDB-BINARY", 
  "REDDIT-BINARY" or "PROTEINS".
  
  .. note::
      Some datasets may not come with any node labels.
      You can then either make use of the argument :obj:`use_node_attr`
      to load additional continuous node attributes (if present) or provide
      synthetic node features using transforms such as
      like :class:`torch_geometric.transforms.Constant` or
      :class:`torch_geometric.transforms.OneHotDegree`.
  
  Args:
      root (string): Root directory where the dataset should be saved.
      name (string): The `name
          <https://chrsmrrs.github.io/datasets/docs/datasets/>`_ of the
          dataset.
      task (string): The evaluation task. Either 'semisupervised' or
          'unsupervised'.
      transform (callable, optional): A function/transform that takes in an
          :obj:`torch_geometric.data.Data` 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
          an :obj:`torch_geometric.data.Data` 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 an
          :obj:`torch_geometric.data.Data` object and returns a boolean
          value, indicating whether the data object should be included in the
          final dataset. (default: :obj:`None`)
      use_node_attr (bool, optional): If :obj:`True`, the dataset will
          contain additional continuous node attributes (if present).
          (default: :obj:`False`)
      use_edge_attr (bool, optional): If :obj:`True`, the dataset will
          contain additional continuous edge attributes (if present).
          (default: :obj:`False`)
      cleaned (bool, optional): If :obj:`True`, the dataset will
          contain only non-isomorphic graphs. (default: :obj:`False`)
      processed_filename (string, optional): The name of the processed data file.
          (default: obj: `data.pt`)
code: def __init__(
      self,
      root,
      name,
      task,
      transform=None,
      pre_transform=None,
      pre_filter=None,
      use_node_attr=False,
      use_edge_attr=False,
      cleaned=False,
      processed_filename="data.pt",
  ):
      self.processed_filename = processed_filename
      self.name = name
      self.cleaned = cleaned
      self.task = task
      super(TUDatasetExt, self).__init__(
          root, transform, pre_transform, pre_filter
      )
  
      if self.task == "semisupervised":
          self.data, self.slices = torch.load(self.processed_paths[0])
          if self.data.x is not None and not use_node_attr:
              num_node_attributes = self.num_node_attributes
              self.data.x = self.data.x[:, num_node_attributes:]
          if self.data.edge_attr is not None and not use_edge_attr:
              num_edge_attributes = self.num_edge_attributes
              self.data.edge_attr = self.data.edge_attr[
                  :, num_edge_attributes:
              ]
  
      elif self.task == "unsupervised":
          self.data, self.slices = torch.load(self.processed_paths[0])
          if self.data.x is not None and not use_node_attr:
              num_node_attributes = self.num_node_attributes
              self.data.x = self.data.x[:, num_node_attributes:]
          if self.data.edge_attr is not None and not use_edge_attr:
              num_edge_attributes = self.num_edge_attributes
              self.data.edge_attr = self.data.edge_attr[
                  :, num_edge_attributes:
              ]
          if self.data.x is None:
              edge_index = self.data.edge_index[0, :].numpy()
              _, num_edge = self.data.edge_index.size()
              nlist = [
                  edge_index[n] + 1
                  for n in range(num_edge - 1)
                  if edge_index[n] > edge_index[n + 1]
              ]
              nlist.append(edge_index[-1] + 1)
  
              num_node = np.array(nlist).sum()
              self.data.x = torch.ones((num_node, 1))
  
              edge_slice = [0]
              k = 0
              for n in nlist:
                  k = k + n
                  edge_slice.append(k)
              self.slices["x"] = torch.tensor(edge_slice)
      else:
          ValueError("Wrong task name")
  
imports: import os.path
  from itertools import repeat
  import os, shutil, torch
  import numpy
  from torch_geometric.data import InMemoryDataset, download_url, extract_zip
  from torch_geometric.io import read_tu_data
label_desc: Use image node_id 1 to create a new TUDatasetExt object from inherited base classes: InMemoryDataset with example: obj = TUDatasetExt(root, name, task, transform, pre_transform, pre_filter, use_node_attr, use_edge_attr, cleaned, processed_filename)