code: def test_dataset_summary_hetero_per_type_check():
      dataset = FakeHeteroDataset(num_graphs=10)
      exp_num_nodes = torch.tensor([data.num_nodes for data in dataset])
      exp_num_edges = torch.tensor([data.num_edges for data in dataset])
  
      summary = dataset.get_summary()
  
      assert summary.name == "FakeHeteroDataset"
      assert summary.num_graphs == 10
  
      check_stats(summary.num_nodes, exp_num_nodes)
      check_stats(summary.num_edges, exp_num_edges)
  
      num_nodes_per_type = {}
      for node_type in dataset.node_types:
          num_nodes = [data[node_type].num_nodes for data in dataset]
          num_nodes_per_type[node_type] = torch.tensor(num_nodes)
  
      assert len(summary.num_nodes_per_type) == len(dataset.node_types)
      for node_type, stats in summary.num_nodes_per_type.items():
          check_stats(stats, num_nodes_per_type[node_type])
  
      num_edges_per_type = {}
      for edge_type in dataset.edge_types:
          num_edges = [data[edge_type].num_edges for data in dataset]
          num_edges_per_type[edge_type] = torch.tensor(num_edges)
  
      assert len(summary.num_edges_per_type) == len(dataset.edge_types)
      for edge_type, stats in summary.num_edges_per_type.items():
          check_stats(stats, num_edges_per_type[edge_type])
  
file_path: pytorch_geometric/test/data/test_dataset_summary.py
imports: import torch
  from torch import Tensor
  from torch_geometric.data.summary import Stats, Summary
  from torch_geometric.datasets import FakeDataset, FakeHeteroDataset
  from torch_geometric.testing import withPackage
label_desc: Use image node_id 6 for calling a global function with example usage: test_dataset_summary_hetero_per_type_check() without return types