There isn’t a layer for that in pytorch.
Typically you would not use nn.Sequential but nn.Module and spell out the forward.
You could also put the things (taking items from the tuple, .view or so) between LSTM and Linear in a layer, but that would feel (to me) a bit artificial in pytorch.
That said, don’t believe my style advice, but use what works best for your project.
Best regards
Thomas