code: def test_summary_with_leaf_module(gcn):
      expected = """# noqa: E501
  +-----------------------------------------+--------------------+----------------+----------+
  | Layer                                   | Input Shape        | Output Shape   | #Param   |
  |-----------------------------------------+--------------------+----------------+----------|
  | GCN                                     | [100, 32], [2, 20] | [100, 32]      | 1,072    |
  | ├─(dropout)Dropout                      | [100, 16]          | [100, 16]      | --       |
  | ├─(act)ReLU                             | [100, 16]          | [100, 16]      | --       |
  | ├─(convs)ModuleList                     | --                 | --             | 1,072    |
  | │    └─(0)GCNConv                       | [100, 32], [2, 20] | [100, 16]      | 528      |
  | │    │    └─(aggr_module)SumAggregation | [120, 16]          | [100, 16]      | --       |
  | │    │    └─(lin)Linear                 | [100, 32]          | [100, 16]      | 512      |
  | │    └─(1)GCNConv                       | [100, 16], [2, 20] | [100, 32]      | 544      |
  | │    │    └─(aggr_module)SumAggregation | [120, 32]          | [100, 32]      | --       |
  | │    │    └─(lin)Linear                 | [100, 16]          | [100, 32]      | 512      |
  | ├─(norms)ModuleList                     | --                 | --             | --       |
  | │    └─(0)Identity                      | [100, 16]          | [100, 16]      | --       |
  | │    └─(1)Identity                      | --                 | --             | --       |
  +-----------------------------------------+--------------------+----------------+----------+
  """
      assert (
          summary(
              gcn["model"],
              gcn["x"],
              gcn["edge_index"],
              leaf_module=None,
          )
          == expected[13:-1]
      )
  
imports: from typing import Optional
  import pytest
  import torch
  from torch import Tensor, nn
  import torch_geometric.typing
  from torch_geometric.nn import Linear, SAGEConv, summary, to_hetero
  from torch_geometric.nn.models import GCN
  from torch_geometric.testing import withPackage
  from torch_geometric.typing import SparseTensor
label_desc: Use image node_id 6 for calling a global function with example usage: test_summary_with_leaf_module(gcn) without return types