code: def __repr__(self) -> str:
      from tabulate import tabulate
  
      body = f"{self.name} (#graphs={self.num_graphs}):\n"
  
      content = [["", "#nodes", "#edges"]]
      stats = [self.num_nodes, self.num_edges]
      for field in Stats.__dataclass_fields__:
          row = [field] + [f"{getattr(s, field):.1f}" for s in stats]
          content.append(row)
      body += tabulate(content, headers="firstrow", tablefmt="psql")
  
      if self.num_nodes_per_type is not None:
          content = [[""]]
          content[0] += list(self.num_nodes_per_type.keys())
  
          for field in Stats.__dataclass_fields__:
              row = [field] + [
                  f"{getattr(s, field):.1f}"
                  for s in self.num_nodes_per_type.values()
              ]
              content.append(row)
          body += "\nNumber of nodes per node type:\n"
          body += tabulate(content, headers="firstrow", tablefmt="psql")
  
      if self.num_edges_per_type is not None:
          content = [[""]]
          content[0] += [
              f"({', '.join(edge_type)})"
              for edge_type in self.num_edges_per_type.keys()
          ]
  
          for field in Stats.__dataclass_fields__:
              row = [field] + [
                  f"{getattr(s, field):.1f}"
                  for s in self.num_edges_per_type.values()
              ]
              content.append(row)
          body += "\nNumber of edges per edge type:\n"
          body += tabulate(content, headers="firstrow", tablefmt="psql")
  
      return body
  
file_path: pytorch_geometric/torch_geometric/data/summary.py
imports: from collections import defaultdict
  from dataclasses import dataclass
  from typing import Dict, List, Optional, Union
  import torch
  from tqdm import tqdm
  from typing_extensions import Self
  from torch_geometric.data import Dataset, HeteroData
  from torch_geometric.typing import EdgeType, NodeType
label_desc: Use image node_id 2 for calling the Summary obj's underlying member method code with example usage: obj.__repr__() and returns: body