class_docstr: The Flickr dataset from the `"GraphSAINT: Graph Sampling Based
  Inductive Learning Method" <https://arxiv.org/abs/1907.04931>`_ paper,
  containing descriptions and common properties of images.
  
  Args:
      root (str): Root directory where the dataset should be saved.
      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`)
  
  **STATS:**
  
  .. list-table::
      :widths: 10 10 10 10
      :header-rows: 1
  
      * - #nodes
        - #edges
        - #features
        - #classes
      * - 89,250
        - 899,756
        - 500
        - 7
code: def process(self) -> None:
      f = np.load(osp.join(self.raw_dir, "adj_full.npz"))
      adj = sp.csr_matrix(
          (f["data"], f["indices"], f["indptr"]), f["shape"]
      )
      adj = adj.tocoo()
      row = torch.from_numpy(adj.row).to(torch.long)
      col = torch.from_numpy(adj.col).to(torch.long)
      edge_index = torch.stack([row, col], dim=0)
  
      x = np.load(osp.join(self.raw_dir, "feats.npy"))
      x = torch.from_numpy(x).to(torch.float)
  
      ys = [-1] * x.size(0)
      with open(osp.join(self.raw_dir, "class_map.json")) as f:
          class_map = json.load(f)
          for key, item in class_map.items():
              ys[int(key)] = item
      y = torch.tensor(ys)
  
      with open(osp.join(self.raw_dir, "role.json")) as f:
          role = json.load(f)
  
      train_mask = torch.zeros(x.size(0), dtype=torch.bool)
      train_mask[torch.tensor(role["tr"])] = True
  
      val_mask = torch.zeros(x.size(0), dtype=torch.bool)
      val_mask[torch.tensor(role["va"])] = True
  
      test_mask = torch.zeros(x.size(0), dtype=torch.bool)
      test_mask[torch.tensor(role["te"])] = True
  
      data = Data(
          x=x,
          edge_index=edge_index,
          y=y,
          train_mask=train_mask,
          val_mask=val_mask,
          test_mask=test_mask,
      )
  
      data = (
          data
          if self.pre_transform is None
          else self.pre_transform(data)
      )
  
      self.save([data], self.processed_paths[0])
  
file_path: pytorch_geometric/torch_geometric/datasets/flickr.py
imports: import json
  import os
  import os.path
  from typing import Callable, List, Optional
  import numpy
  import scipy.sparse
  import torch
  from torch_geometric.data import Data, InMemoryDataset, download_url
label_desc: Use image node_id 5 for calling the Flickr obj's underlying member method code with example usage: obj.process() without return types