Extract Embeddings

Hello,
I have a question about how to extract embedding from the last layer of GNN model (GAT for example)?
Someone know how to do that or if there is a function to do this.
Thank you