How to extract sentence or document embedding using longformer from model file?

I have fine tuned longformer model on LongformerForMaskedLM and saved it as .bin file.
I have loaded the bin file and I want to extract sentence embedding for sentences ( Normalised by attention masks).

Here is my code:

model = LongformerModel.from_pretrained('checkpoint_longformer',output_hidden_states = True)
tokenizer = LongformerTokenizer.from_pretrained('checkpoint_longformer')

# Put the model in "evaluation" mode, meaning feed-forward operation.


From here how should I get sentence/document level embedding for every row in batches. ( Normalised by attention masks).
I am stuck at this point. Please help.