Please note that I am doing
my_Longformer_multiple_choice_model.encoder.layer[layer_index].forward(hidden_output, attention_mask,output_attention=False).
Please read my question carefully. my_attention_mask can be used in the command
my_Longformer_multiple_choice_model(input_ids=input_ids,....,attention_mask=my_attention_mask)  without an error.
You are not doing
my_Longformer_multiple_choice_model.encoder.layer[layer_index].forward().
This has to do with HuggingFace code for the .encoder.layer.