class_docstr: The MixHop synthetic dataset from the `"MixHop: Higher-Order
  Graph Convolutional Architectures via Sparsified Neighborhood Mixing"
  <https://arxiv.org/abs/1905.00067>`_ paper, containing 10
  graphs, each with varying degree of homophily (ranging from 0.0 to 0.9).
  All graphs have 5,000 nodes, where each node corresponds to 1 out of 10
  classes.
  The feature values of the nodes are sampled from a 2D Gaussian
  distribution, which are distinct for each class.
  
  Args:
      root (str): Root directory where the dataset should be saved.
      homophily (float): The degree of homophily (one of :obj:`0.0`,
          :obj:`0.1`, ..., :obj:`0.9`).
      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`)
      force_reload (bool, optional): Whether to re-process the dataset.
          (default: :obj:`False`)
code: def process(self) -> None:
      x = torch.from_numpy(np.load(self.raw_paths[0]))
      y = torch.from_numpy(np.load(self.raw_paths[1])).argmax(dim=-1)
  
      edges = pickle.load(
          open(self.raw_paths[2], "rb"), encoding="latin1"
      )
      row, col = [], []
      for k, v in edges.items():
          row += [k] * len(v)
          col += v
  
      edge_index = torch.tensor([row, col], dtype=torch.long)
  
      N_s = x.size(0) // 3
      train_mask = torch.zeros(x.size(0), dtype=torch.bool)
      train_mask[:N_s] = True
      val_mask = torch.zeros(x.size(0), dtype=torch.bool)
      val_mask[N_s : 2 * N_s] = True
      test_mask = torch.zeros(x.size(0), dtype=torch.bool)
      test_mask[2 * N_s :] = True
  
      data = Data(
          x=x,
          y=y,
          edge_index=edge_index,
          train_mask=train_mask,
          val_mask=val_mask,
          test_mask=test_mask,
      )
  
      if self.pre_transform is not None:
          data = self.pre_transform(data)
  
      self.save([data], self.processed_paths[0])
  
file_path: pytorch_geometric/torch_geometric/datasets/mixhop_synthetic_dataset.py
imports: import os.path
  import pickle
  from typing import Callable, List, Optional
  import numpy
  import torch
  from torch_geometric.data import Data, InMemoryDataset, download_url
label_desc: Use image node_id 7 for calling the MixHopSyntheticDataset obj's underlying member method code with example usage: obj.process() without return types