code: def __init__(self, transform: Optional[Callable] = None):
      super().__init__(transform=transform)
  
      data = HeteroData()
  
      num_papers = 100
      num_authors = 10
  
      data["paper"].x = torch.randn(num_papers, 16)
      data["author"].x = torch.randn(num_authors, 8)
  
      edge_index = get_random_edge_index(
          num_src_nodes=num_papers,
          num_dst_nodes=num_authors,
          num_edges=300,
      )
      data["paper", "author"].edge_index = edge_index
      data["author", "paper"].edge_index = edge_index.flip([0])
  
      data["paper"].y = torch.randint(0, 4, (num_papers,))
  
      perm = torch.randperm(num_papers)
      data["paper"].train_mask = torch.zeros(
          num_papers, dtype=torch.bool
      )
      data["paper"].train_mask[perm[0:60]] = True
      data["paper"].val_mask = torch.zeros(num_papers, dtype=torch.bool)
      data["paper"].val_mask[perm[60:80]] = True
      data["paper"].test_mask = torch.zeros(
          num_papers, dtype=torch.bool
      )
      data["paper"].test_mask[perm[80:100]] = True
  
      self.data, self.slices = self.collate([data])
  
file_path: pytorch_geometric/torch_geometric/testing/data.py
imports: from typing import Callable, Optional
  import torch
  from torch import Tensor
  from torch_geometric.data import HeteroData, InMemoryDataset
  from torch_geometric.typing import TensorFrame, torch_frame
  from torch_geometric.utils import coalesce
label_desc: Use image node_id 1 to create a new FakeHeteroDataset object from inherited base classes: InMemoryDataset with example: obj = FakeHeteroDataset(transform)