code: def test_sequential():
      x = torch.randn(4, 16)
      edge_index = torch.tensor(
          [[0, 0, 0, 1, 2, 3], [1, 2, 3, 0, 0, 0]]
      )
      batch = torch.zeros(4, dtype=torch.long)
  
      model = Sequential(
          "x, edge_index",
          [
              (GCNConv(16, 64), "x, edge_index -> x"),
              ReLU(inplace=True),
              (GCNConv(64, 64), "x, edge_index -> x"),
              ReLU(inplace=True),
              Linear(64, 7),
          ],
      )
      model.reset_parameters()
  
      assert len(model) == 5
      assert str(model) == (
          "Sequential(\n"
          "  (0) - GCNConv(16, 64): x, edge_index -> x\n"
          "  (1) - ReLU(inplace=True): x -> x\n"
          "  (2) - GCNConv(64, 64): x, edge_index -> x\n"
          "  (3) - ReLU(inplace=True): x -> x\n"
          "  (4) - Linear(in_features=64, out_features=7, bias=True): x -> x\n"
          ")"
      )
  
      assert isinstance(model[0], GCNConv)
      assert isinstance(model[1], ReLU)
      assert isinstance(model[2], GCNConv)
      assert isinstance(model[3], ReLU)
      assert isinstance(model[4], Linear)
  
      assert model.module_headers[0] == (["x", "edge_index"], ["x"])
      assert model.module_headers[1] == (["x"], ["x"])
      assert model.module_headers[2] == (["x", "edge_index"], ["x"])
      assert model.module_headers[3] == (["x"], ["x"])
      assert model.module_headers[4] == (["x"], ["x"])
  
      out = model(x, edge_index)
      assert out.size() == (4, 7)
  
      model = Sequential(
          "x, edge_index, batch",
          [
              (Dropout(p=0.5), "x -> x"),
              (GCNConv(16, 64), "x, edge_index -> x1"),
              ReLU(inplace=True),
              (GCNConv(64, 64), "x1, edge_index -> x2"),
              ReLU(inplace=True),
              (lambda x1, x2: [x1, x2], "x1, x2 -> xs"),
              (JumpingKnowledge("cat", 64, num_layers=2), "xs -> x"),
              (global_mean_pool, "x, batch -> x"),
              Linear(2 * 64, 7),
          ],
      )
      model.reset_parameters()
  
      out = model(x, edge_index, batch)
      assert out.size() == (1, 7)
  
file_path: pytorch_geometric/test/nn/test_sequential.py
imports: from collections import OrderedDict
  import torch
  import torch.fx
  from torch.nn import Dropout, Linear, ReLU
  import torch_geometric.typing
  from torch_geometric.nn import GCNConv, JumpingKnowledge, MessagePassing, SAGEConv, Sequential, global_mean_pool, to_hetero
  from torch_geometric.typing import SparseTensor
label_desc: Use image node_id 1 for calling a global function with example usage: test_sequential() without return types