code: def test_get_embeddings():
      x = torch.randn(6, 5)
      edge_index = torch.tensor([[0, 1, 2, 3, 4], [1, 2, 3, 4, 5]])
  
      with pytest.warns(
          UserWarning, match="any 'MessagePassing' layers"
      ):
          intermediate_outs = get_embeddings(Linear(5, 5), x)
      assert len(intermediate_outs) == 0
  
      model = GNN()
      expected_embeddings = model(x, edge_index)
  
      embeddings = get_embeddings(model, x, edge_index)
      assert len(embeddings) == 2
      for expected, out in zip(expected_embeddings, embeddings):
          assert torch.allclose(expected, out)
  
file_path: pytorch_geometric/test/utils/test_embedding.py
imports: import pytest
  import torch
  from torch_geometric.nn import GCNConv, Linear
  from torch_geometric.utils import get_embeddings
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_embeddings() without return types