How to get the middle hidden states from Hubert

I have a question, and I would appreciate it if you could help me.
How can I get the embedding of the middle hidden layers from Hubert (the hugging face model just return the last hidden states)? Also, does Hubert make a representation from the total input? like Bert and the embedding vector of the CLS token.